perl is designed for this kind of thing.
use it carefully, though--AFTER you back everything up!
#!/usr/bin/perl
use File::Find;
see 'man File::Find' (or perldoc 'File::Find') for the
full poop.
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Their is five errers in this sentance.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
Jaume Teixi <[EMAIL PROTECTED]> writes:
> Howto search and replace for a pattern over all system files ?
>
> It's faster with vi, ed ?
sed. And a bit of shell script. For instance (off the top of my head,
so no guarantees):
for i in $file_li
> Howto search and replace for a pattern over all system files ?
>
try a perl-expression.
find / '!' -type d -exec perl -e "s/foo/bar/baz" '{}' ';'
this is definitely not ready-to-run, but it's a good point to start
from. look at the perl man page.
--
Hi! I'm a .signature virus! Copy me into
3 matches
Mail list logo