× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Simon,

Hope you are feeling better, find is another option that
is recursive and supports a -exec. The following is a
little easier for me to remember and is short enough
that I don't mind typing it in:

find /QSYS.LIB/MYLIB.LIB/Q*.FILE -exec grep -il 'searchstring' {} \;

The -i is for case insensitive, and the -l is for list file
name rather than the line with the searchstring.

David Morris


>>> shc@flybynight.com.au 04/05/02 05:25PM >>>

Hello Terry,

You wrote:

grep does not recurse through directories but you can achieve that
effect
by typing the following incantation (change the path to suit your
system):

for PATH_NAME in `ls -d /qsys.lib/shcsrc.lib/*`
do
SEARCH=`echo ${PATH_NAME}/*.MBR`
grep -c 'EXFMT' ${SEARCH}
done

NOTE:  The ` quotes in the above are really graves (that thing under
the
tilde, which is that squiggle above the TAB key).  The ' quotes are
really
apostrophes.  Press Enter after typing each line.  It will run after
the
word 'done' is processed.

You could also stick this in a shell script and make it generic.
Dontcha
jus lurve nix!  Excuse me while I throw up!

Regards,
Simon Coulter.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.