Hi all,
I had a small requirement in shell script.
In the Input directory iam having input file as RATE3092008033101.csv
I have to change the above file as PRICE3092008033101.csv and save the file in another directory.
RATE should be replaced by PRICE. And the input file names are not fixed , any new files may come in future.
Only RATE string is fixed, i have to replace with string PRICE.
please help me out in solving this one.
Thanks in advance.
shell script for changing the input file as output file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 407
- Joined: Mon Jun 27, 2005 8:54 am
- Location: Walker, Michigan
- Contact:
Re: shell script for changing the input file as output file
cp RATE3092008033101.csv $(echo /dirname/RATE3092008033101.csv | sed 's/RATE/PRICE/g')dodda wrote:Hi all,
I had a small requirement in shell script.
In the Input directory iam having input file as RATE3092008033101.csv
I have to change the above file as PRICE3092008033101.csv and save the file in another directory.
RATE should be replaced by PRICE. And the input file names are not fixed , any new files may come in future.
Only RATE string is fixed, i have to replace with string PRICE.
please help me out in solving this one.
Thanks in advance.