With perl installed:

 find directory | xargs perl -pi -e 's/needle/replace/g'

With sed installed:

 #!/bin/bash

 find directory > mirror
 exec 3<mirror

 while read file <&3
 do
  replace=`more $file | sed -r -e 's/needle/replace/g'`
  cat $replace > $file
 done

On Sep 19, 11:30 pm, bittu <shashank7andr...@gmail.com> wrote:
> Linux shell command to find all files in a directory which contain ip
> addresses

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to