[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] HOW2->automate search/replace text in ALL *.c files in Tree?
- Subject: [ale] HOW2->automate search/replace text in ALL *.c files in Tree?
- From: abarton at mindspring.com (Alexander Barton)
- Date: Sun, 26 Nov 2000 08:44:57 -0500
Courtney Thomas wrote:
>
> Happy Holidays !
>
> I know how to do a find/replace in a single file using Xemacs but not
> how to do a find/replace on all files in a Tree ? Any help here ?
>
> Also, perl is available, but I'd prefer a xemacs answer as I plan on
> this environment, unless there's a better environment. How 'bout it ?
>
> Thanks once more to all,
>
> Kind regards,
>
> Courtney
find . -name \*.c -print |
while read FILE
do
mv $FILE $FILE.bak
sed -e "s/Windows/Linux/g" $FILE.bak > $FILE
done
--
Alexander Barton "...Unix doesn't have a monopoly on good ideas,
abarton at mindspring.com it just owns most of them." -Alan Cox
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.