What I want:
Take file.txt and *strip* out "foo" and replace with "bar", *but* I
don't want to redirect to a tmp file or anything:  I would like one
command.

Perl:
1. perl -pi -e 's/foo/bar/g' file.txt

SED, for example:
1. sed 's/foo/bar/g' file.txt > file.txt.tmp
2. mv file.txt.tmp file.txt

So perl does what I want to, but I'd prefer to stay with awk, sed, or
whatever GNU utils, if possible.

Can it be done?

Marco





-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to