[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Mar 2004
]
RE: [edlug] Global Search and Replace
Thanks all for your help.
All a bit fiddly, so going to use BBEdit global search and replace on nested folders on a Mac ;-)
P
-----Original Message-----
From: owner-edlug@xxx.xxx.xxx on behalf of Justin B Rye
Sent: Wed 17/03/2004 00:22
To: edlug@xxx.xxx.xxx
Cc:
Subject: 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!
Okay:
find -name *.html -print0 | xargs -tr0l sed -i "s/$A/$B/"
--
JBR
Ankh kak! (Ancient Egyptian blessing)
-
----------------------------------------------------------------------
You can find the EdLUG mailing list FAQ list at:
http://www.edlug.org.uk/list_faq.html
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿØ¢çø§vØ^ÒÔf¢)à+-%ËZ·øm¶ÿÿ0ýçeºè®îùb²ßßj¯á