how do i replace a string with some other string in a number of files with
one command?
Thanks
Willem Kossen
Thanks
Willem Kossen
This question is asked at least twice a week...
--
Michael Heiming
Remove +SIGNS and www. if you expect an answer, sorry for
inconvenience, but I get tons of SPAM
> how do i replace a string with some other string in a number of files with
> one command?
> Thanks
> Willem Kossen
for f in *.txt ; do vi -c '%s/string/replacement/g | wq' $f >/dev/null
; done
1. Find a string in a text file and replace with another string to eof
Hi,
I am trying to write a very simple shell script that will help me find a
string in a text file and replace that same string with another string
from command line.
Something like:
./myscript "foo" "bar"
"foo" is the string to find
"bar" is the string replacement
Multiple replacements in the file, of course.
Thanks.
3. script to recursively find files containing string and replace string
4. help!
5. Korn Shell: Using sed to replace string with multiline string?
6. Interdrive client 5.0 serial number?
7. Can I replace a section of string/file using sed?
8. Red Hat 7.0 Boot Problems with System Commander 2000
9. replace a single string in multiple files w/ a shell script + sed
10. How to replace a string in a list of files?
11. replace a string in a text file through command line (shell)
12. **** FINDING & REPLACING A STRING WITHIN MANY FILES *****
13. shell command to replace string in text files ?