[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] char replacement - repost
- Subject: [ale] char replacement - repost
- From: esoteric at 3times25.net (Geoffrey)
- Date: Wed Nov 19 09:46:04 2003
- In-reply-to: <[email protected]>
- References: <[email protected]>
Robert Coggins wrote:
> Sorry if you get this twice. I did not ever see my post of this
> question from yesterday.
>
> Hey all,
>
> Is there a way to change a word(chars) in every file of a directory
> recursively? Similarly to using s/John/George/g in vim?
cd TopLevelDirectoryWhereTheFilesExist
for fn in $(find . -type f -print); do
sed 's/John/George/g' $fn > tmpfile
mv tmpfile $fn
done
Please test it as I've not. ;)
--
Until later, Geoffrey esoteric at 3times25.net
Building secure systems inspite of Microsoft