[CentOS] replace

Phil Schaffner P.R.Schaffner at IEEE.org
Fri Oct 24 21:37:52 UTC 2008


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.



More information about the CentOS mailing list