Re: Search --> Replace on Unix

2001-09-12 Thread lc-brian_d_foy
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John W. Krahn) wrote: > brian d foy wrote: > > In article <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] (David Gilden) wrote: > > > perl -e 'foreach $file (glob("*")) {grep '../forum_idx.pl' >'../cgi-bin/forum_idx.pl');}' > > perl -pi.old -

Re: Search --> Replace on Unix

2001-09-06 Thread John W. Krahn
Brian D Foy wrote: > > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (David Gilden) wrote: > > > perl -e 'foreach $file (glob("*")) {grep '../forum_idx.pl' >'../cgi-bin/forum_idx.pl');}' > > you just want to go through each file and replace those instances? > > perl -pi.old -e "s|..

Re: Search --> Replace on Unix

2001-09-06 Thread brian d foy
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (David Gilden) wrote: > perl -e 'foreach $file (glob("*")) {grep '../forum_idx.pl' >'../cgi-bin/forum_idx.pl');}' you just want to go through each file and replace those instances? perl -pi.old -e "s|../forum_idx.pl|../cgi-bin/forum_idx.pl

Search --> Replace on Unix

2001-09-06 Thread David Gilden
Hello, What is the best way do to search and replace operation on a whole directory on a UNIX box? Sed? Awk? Perl? I know this is wrong, what I want to do is a search and replace, find '../forum_idx.pl' and replace with '../forum_idx.pl' I have to hit a whole directory with this change, (and