[CentOS] replace

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



On Fri, 2008-10-24 at 23:13 +0200, Pint?r Tibor wrote:
> perl -pi -e "s/foo/bar/" *.html

Won't recurse down the directory tree, but I guess the OP didn't
actually ask for that.  Could substitute the perl commad for sed in the
earlier example.  Many ways to skin the cat (all equally odious to the
cat :-).

BTW, the xargs solution discussed in the 'ls and rm: "argument list too
long"' thread could be applied here too if you have a LOT of files.


[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