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