Hallo Wie kann ich in einem Text alle Vorkommen von foo in bar umändern ? Ich habe es mit tr ( cat text |tr 'foo' 'bar') versucht, bin damit aber gescheitert. Gibts ein anders Tool oder mach ich was flasch ? Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
On Die, 27 Jun 2000, Daniel Senger wrote:
perl -e 's/gopher/World Wide Web/gi' -p -i.bak *.html This command, issued at the Unix prompt, executes the short Perl program specified after the -e. This particular single-command program substitutes for original word "gopher" the phrase "World Wide Web", checking files ending in ".html" in the current directory. If any file "blah.html" needs changing, a backup of the original is made as file "blah.html.bak". Mit freundlichen Grüßen, Joerg Henner. -- LinuxHaus Stuttgart | Tel.: +49 (7 11) 2 85 19 05 Jörg Henner & Adrian Reyer, Datentechnik GbR | D2: +49 (1 72) 7 35 31 09 | Fax: +49 (7 11) 5 78 06 92 Linux, Netzwerke, Webhosting & Support | http://lihas.de --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
On Die, 27 Jun 2000, Daniel Senger wrote:
perl -e 's/gopher/World Wide Web/gi' -p -i.bak *.html This command, issued at the Unix prompt, executes the short Perl program specified after the -e. This particular single-command program substitutes for original word "gopher" the phrase "World Wide Web", checking files ending in ".html" in the current directory. If any file "blah.html" needs changing, a backup of the original is made as file "blah.html.bak". Mit freundlichen Grüßen, Joerg Henner. -- LinuxHaus Stuttgart | Tel.: +49 (7 11) 2 85 19 05 Jörg Henner & Adrian Reyer, Datentechnik GbR | D2: +49 (1 72) 7 35 31 09 | Fax: +49 (7 11) 5 78 06 92 Linux, Netzwerke, Webhosting & Support | http://lihas.de --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com
participants (2)
-
d.senger@mail.isis.de
-
jhe@lihas.de