Howto search and replace...

2000-05-10 Thread Jaume Teixi
Howto search and replace for a pattern over all system files ? It's faster with vi, ed ?

Re: Howto search and replace...

2000-05-10 Thread Oswald Buddenhagen
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

Re: Howto search and replace...

2000-05-10 Thread Graeme Mathieson
-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_list

Re: Howto search and replace...

2000-05-10 Thread w trillich
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.