![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how do I replace a word in a file using DOS commands?? | sabithareddym | Windows & DOS: Issues & Discussions | 1 | 05-21-2008 09:17 PM |
| replace words in file based on another file | kinmak | Shell Programming and Scripting | 9 | 05-07-2008 02:06 AM |
| Replace word in a file | sasiharitha | UNIX for Dummies Questions & Answers | 3 | 12-04-2007 09:11 PM |
| replace word in a file | ust | Shell Programming and Scripting | 5 | 11-30-2007 04:03 PM |
| return a word between two words | bryan | UNIX for Dummies Questions & Answers | 4 | 05-23-2006 10:56 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
How to replace a word with a series of words in a file
Hi,
I have a Template file 'TL.body' which says as follows: "There are no <FILENAME> files on the server. " The missing file names are identified and stored in a variable. For Eg: MISSFILE="abc.txt def.txt xyz.txt" I want the values of MISSFILE variable to be replaced against <FILENAME> and store the result in another Temp file. I tried using the following command: sed 's/<FILENAME>/'$MISSFILE'/g' TL.body > Temp.txt However, it gives following error: sed: Function s/<FILENAME>/abc.txt cannot be parsed. Could somebody help me out to overcome this problem. TIA Regards, Ramesh |
| Forum Sponsor | ||
|
|