If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Unix Script

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-22-04, 14:43
kmal kmal is offline
Registered User
 
Join Date: Mar 2004
Posts: 1
Post Unix Script

Please help

Read a file asuume a.lst with a value 12345
How can I make an external unix file with value 123456 with any extensio.

Thank you
KM
Reply With Quote
  #2 (permalink)  
Old 03-22-04, 15:22
aigles aigles is offline
Registered User
 
Join Date: Jan 2004
Location: Bordeaux, France
Posts: 319
I am not sure to understand what you want to do...
Something like this ?

Code:
read value < a.lst   # read value 12345 stored in file a.lst
echo "${value}6" > b.lst  # write 123456 in new file b.lst
__________________
Jean-Pierre.
Reply With Quote
  #3 (permalink)  
Old 03-22-04, 15:44
aigles aigles is offline
Registered User
 
Join Date: Jan 2004
Location: Bordeaux, France
Posts: 319
Quote:
[SIZE=1]Originally posted by kmal
Sorry, I did not eloborate it properly. Here is my problem

1. I have 3 file a.lst abc.bbb and abc.ccc
2. a.lst has a vlue 123, i want to read
3. I want to rename abc.bbb & abc.ccc to 123.bbb & 123.ccc

Thank you for your help
Kma

Code:
read value < a.lst
mv abc.bbb $value.bbb
mv abc.ccc $value.ccc
__________________
Jean-Pierre.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On