Re: replace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, Oct 24, 2008 at 5:58 PM, Phil Schaffner
<Philip.R.Schaffner@xxxxxxxx> wrote:
> Mad Unix wrote:
>>
>> i need your feedback about this command, it should find a string in
>> multiple html files in a directory and replace it with a different
>> string...
>>
>> find /dir -name "*.html" -exec sed -i 's/"old"/"new"/g' {} \;
>
> Mad Unix,
>
> find /dir -name "*.html" -exec sed -i -e 's/old/new/g' {} \;

find /dir -name "*.html" | xargs sed -i -e 's/old/new/g'

-- 
Marcelo

"¿No será acaso que ésta vida moderna está teniendo más de moderna que
de vida?" (Mafalda)
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux