Sorry this doesn't work all grep out there ... On 22 Sep, 01:40, Prem Mallappa <prem.malla...@gmail.com> wrote: > @Neeraj: > Your approach is good, this however lists 9999.999.999.999 which is > not a valid IP address. > > grep -lR "[0-255]\.[0-255]\.[0-255]\.[0-255]" * > > further filter out the output of above to invalidate any ip address > that are reserved. > > -l is for suppressing normal output and printing only filename > -R is recursive > > On 21 Sep, 18:46, Neeraj <17.neera...@gmail.com> wrote: > > > > > *grep -R "\<[0-9]\+.[0-9]\+.[0-9]\+.[0-9]\+\>" * | awk -F':' '{print $1}' | > > uniq > > * > > works on my system :P > > > On Tue, Sep 21, 2010 at 2:07 PM, Chi <c...@linuxdna.com> wrote: > > > 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<algogeeks%2bunsubscr...@googlegroups > > > .com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/algogeeks?hl=en. > > > -- > > Neeraj
-- 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.