× 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.



Hi,

thank you all for your suggestions, I tried things out and this is what
needs to be done to search for a specific string in the body of a file in
a specific IFS-folder :

strqsh
cd <patch to the IFS-folder>
find . -type f -exec grep -lF "<string>" '{}' ';'


regards
Guy





From: Peter Dow <petercdow@xxxxxxxxx>
To: Scott Klement <midrange-l@xxxxxxxxxxxxxxxx>
Cc: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 23/01/2012 23:23
Subject: Re: Search in content of a IFS file
Sent by: midrange-l-bounces@xxxxxxxxxxxx



No, you're the expert; I didn't' see your post until after I'd sent mine.

I wasn't sure if grep expanded wildcards either, which is why I said "if
grep works like find" as you'd explained in the thread Michael provided
a link to.

On 1/23/2012 12:38 PM, Scott Klement wrote:
Peter,

That searches the contents of a file named '*'. The '*' is no longer
treated as a wildcard, because you put strong quotes around it,
telling QShell not to expand it. (I don't know if grep expands
wildcards?)

Seems to me (as I said in another post) what he wants is this:

QSH CMD('grep -R 110000890 /M3BE/env/PRD/Output')

Unless you have a good reason to make it more complicated than that?



On 1/23/2012 2:17 PM, Peter Dow wrote:
Hi Michael,

Thanks for that link to Scott's explanation (and thanks to Scott for
the
explanation); I would've been stumped. But from Guy's previous posts,
grep needs a list of files, and there are too many. If Scott's
explanation of how to get around it for "find" will work with "grep",
then this ought to work:

QSH CMD('grep 110000890 ''/M3BE/env/PRD/Output/*''')



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.