[ale] char replacement - repost
Geoffrey
esoteric at 3times25.net
Wed Nov 19 13:32:40 EST 2003
Jason Day wrote:
> On Wed, Nov 19, 2003 at 09:44:42AM -0500, Geoffrey wrote:
>
>>for fn in $(find . -type f -print); do
>>
>> sed 's/John/George/g' $fn > tmpfile
>> mv tmpfile $fn
>>done
>
>
> My favorite is:
>
> perl -p -i -e 's/John/George/g' `find . -type f -print`
Okay, see if there any 'old hands' out there. How about a solution that
uses the 'ed' editor?
for fn in $(find . -type f -print); do
ed $fn <<-EOF
1,$ s/John/George/g
w
EOF
done
--
Until later, Geoffrey esoteric at 3times25.net
Building secure systems inspite of Microsoft
More information about the Ale
mailing list