![]() |
|
|
google unix.com
|
|||||||
| Forums | Casino | Register | Forum Rules | Links | Albums | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Search, replace string in file1 with string from (lookup table) file2? | gstuart | Shell Programming and Scripting | 9 | 3 Weeks Ago 06:11 AM |
| replace string in XML with sed | chiru_h | Shell Programming and Scripting | 6 | 04-09-2008 07:49 PM |
| replace string | sam99 | Shell Programming and Scripting | 4 | 03-04-2008 12:39 AM |
| replace a string | melanie_pfefer | Shell Programming and Scripting | 11 | 01-17-2008 09:57 AM |
| Replace string B depending on occurence of string A | hemangjani | Shell Programming and Scripting | 1 | 12-05-2006 04:10 PM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
Is it possible to replace more the 1 string with one SED?
i want to replace two phrases in text file
originalstringA.1. blah blah.... originalstringB.1. got this code so far: #variables IP=$1 NO=$2 FS=$3 IS=$4 NN=1 #echo variables echo '' echo $IP echo $NO echo $FS echo $IS echo '****' echo $NN #generate files and configure while [ $NN -le $NO ] do cp template.egsinp $IP.$NN.egsinp sed s/template/$IP.$NN/ <template.egsinp > $IP.$NN.egsinp #i need something else here that replaces something else and has the same input/output files as the above sed. echo '****' NN=$(($NN + 1)) echo $NN done #exit exit |
| Sponsored Links |