![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Global replace with sed | canary | Shell Programming and Scripting | 5 | 05-15-2008 07:19 AM |
| Perl: Global Search and replace | epi8 | Shell Programming and Scripting | 3 | 05-06-2008 12:18 PM |
| Perl: Search for string on line then search and replace text | Crypto | Shell Programming and Scripting | 4 | 01-04-2008 07:24 AM |
| global replace... | topcat8 | Shell Programming and Scripting | 1 | 10-16-2005 10:10 PM |
| global replace with vi | pixtond | Shell Programming and Scripting | 3 | 06-11-2004 01:54 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Global search ok...but replace?
Gurus,
I have in my /tmp directory 26 files "filea", "fileb"..."filez". Each file contains the name of a database 'dwora' at many, many places within each file. My boss decided to change the name of the db so I need to do (what i'd call) a global search&replace of that string in all my files. So far, I am able to accomplish the following: [orcl@dev1]/orcl/tmp/find . -name 'file*' -exec grep dwmora {} \; -exec sed 's/dwora/dworacle/g' {} \; it outputs to my terminal/screen successfully. However, I want to output my mods in each file from "file*" to "file*.new"....and I can't seem to find the right syntax. I know I can do sed 's/dwora/dworacle/g' filea > filea.new but when I try for multiple files at once, it fails. What am I missing here?Help, please! ps: I am running HP-UX dev1 B.11.00 U 9000/800 |
||||
| Google The UNIX and Linux Forums |
| Forum Sponsor | ||
|
|