[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Mar 2004 ]

Re: [edlug] Global Search and Replace

Dick Middleton wrote:
> Justin B Rye wrote:
>>The problem is that sed doesn't edit the file in place - it just
>>outputs the filtered version to stdout. 
> The -i option replaces the file:
> sed -i s/.../ file

In ssed, sure, but not in the GNU sed in Debian Stable.  Oh, yes,
fair enough, the Testing version's got it - looks like ssed's for
the chop, then!

find -name *.html -print0 | xargs -tr0l sed -i "s/$A/$B/"
Ankh kak! (Ancient Egyptian blessing)
You can find the EdLUG mailing list FAQ list at:

This archive is kept by wibble@morpheux.org.DONTSPAMME