On Wed, 26 Jan 2005 16:43:25 +0100 Anthony Atkielski <[EMAIL PROTECTED]> wrote:
> A few years ago, I'm sure I came across a one-line way of replacing > every occurence of one string with another in an entire directory of > files (potentially including all subdirectories as well). I think it > used sed or awk. Now I can't find it. The examples on the Web are all > multiline scripts or programs, but I'm sure I saw a way to do it all on > just one line. > > Can anyone tell me how to do this? How about something like this (sh style)... for i in `find . -type f`; do sed -i -e 's/string1/string2/g' $i; done Cheers, -- Miguel Mendez <[EMAIL PROTECTED]> http://www.energyhq.es.eu.org PGP Key: 0xDC8514F1
pgpnO8QlJaWIl.pgp
Description: PGP signature
