Re: replace string

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

 



On 24Oct2008 23:26, Mad Unix <madunix@xxxxxxxxx> 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' {} \;

Well, yeah, if you had spelt the "-i" option correctly.
But if you have hard links in there (unlikely, but some people do)
it will break them if it modifies the file.

I have no idea what kind of "feedback" you were after...
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux