Marco Shaw, On Saturday January 04, 2003 12:24, Marco Shaw wrote: > 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?
Not without help. What you want is "bsed". It was written by Cameron Simpson and is great for all of your sed needs. Look for "bsed" on this page. Some of the other stuff might be useful to you as well. http://www.zip.com.au/~cs/css/ -- Brian Ashe CTO Dee-Web Software Services, LLC. [EMAIL PROTECTED] -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list