MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » July 2008

Searching multiple IFS files



fixed

I know this has been discussed at some point. Not sure as to how it was
resolved.

I am needing to locate files in an IFS directory that contain a given string.

Using qp2term, I entered this:

cd to appropriate directory

for i in `ls *.txt`
do
cat $i |grep string && echo $i
done


Eight file names were displayed. I have searched one named file and those
around it, but cannot find the string that was (if I did it right) that was
located.

Two questions:

1) Since echo command is only performed when grep is successful, qhy is the
value presented not apparently a file that contains the string located by grep?

2) Any way that I can disable the huge quantity of job logs produced by the
above commands? Message logging is currently set to 4 0 *NOLIST and *NO

Thanks!






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact