One-line global string replace in all files with sed (or awk?)

Anthony Atkielski atkielski.anthony at wanadoo.fr
Thu Jan 27 22:08:11 PST 2005


Hmm ... maybe I found it:

grep -R -l "xxx" /www/htdocs | xargs sed -i '' -e 's/xxx/yyy/g'

Does that look okay?  Seems to work in my test.

-- 
Anthony




More information about the freebsd-questions mailing list