sed sed sed less sed's please
James McDonald
james
Mon Nov 1 23:46:27 PST 2004
I am trying to do a multiple find and replace in a text file I have the following code... which is a series of piped sed's
can anyone show me a better way I'm hoping there is a way to do the whole 3 replacements with one call to sed?
$ cat test.fw | sed -e 's/INPUT/CUSTOMINPUT/g' \
| sed -e 's/OUTPUT/CUSTOMOUTPUT/g' \
| sed -e 's/FORWARD/CUSTOMFORWARD/g' > test2.fw
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.linux-sxs.org/pipermail/linux-users/attachments/20041102/5b6bd1b3/attachment.html
More information about the Linux-users
mailing list