![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 |
| Perl: Search for string on line then search and replace text | Crypto | Shell Programming and Scripting | 4 | 01-04-2008 10:24 AM |
| Need to search and replace in multiple files in directory hierarchy | umen | Shell Programming and Scripting | 3 | 12-24-2007 04:56 AM |
| Multiple search in multiple files | maxvirrozeito | Shell Programming and Scripting | 2 | 12-13-2007 01:32 PM |
| multiple input search and replace script | tungaw2004 | UNIX for Dummies Questions & Answers | 3 | 04-29-2007 07:59 AM |
| sed search and replace | d__browne | UNIX for Dummies Questions & Answers | 7 | 04-26-2006 09:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Multiple search and replace
Hi,
I have different files and I want to automatically change the values of the defined variables. i want to get rid of editing all the files and make it a little bit faster. my problem is like this. 1. i will input all the new values. 2. substitute this values into the values inside the file. thanks. |
|
||||
|
You can use sed script for this
sed script would contains
s/Search1/Replace1 s/Search2/Replace2 s/Search3/Replace3 s/Search4/Replace4 now you can use this script (TCSH) as foreach f (`cat fileList`) sed -f SedScript $f end |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|