The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 01-25-2008
dbsurf dbsurf is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 23
fast search and replace in all files

Hi

I need to find one string in all files and replace tht string with blank space and need to redirect all the files into the same directory again.

now i am using

find ./ -name "*.dmp" | xargs perl -pi -e 's/\\N//g' | sed 's/.$//g'

but now its not redirrecting properly .

its taking too much time for this operation.

Is there any way to search and replace very fast in all thousand files quickly without looping.