FW: [Gllug] Awk Sed
Bruce Richardson
itsbruce at uklinux.net
Fri Dec 7 17:29:36 UTC 2001
On 12/7/01, 2:55:11 AM, harry <postituk at yahoo.com> (by way of harry
<postituk at yahoo.com>) wrote regarding Re: FW: [Gllug] Awk Sed:
> Put the following in a shell script
> #! /bin/sh
> sed -e 's/'$2'/'$3'/g' $1 > $1ff; more $1ff > $1; rm $1ff; rm *~
sed -e "s/$2/$3/g" $1 > $1ff; mv $1ff $1
is a cleaner version.
> I need to learn more Perl as it keeps coming up as the best utility for
the
> job on more occasions than I care to remember.
I've probably said before that I tend to use the smallest tool necessary
for a job, so I always look at sed and awk before Perl.
--
Bruce
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list