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

When I use this statement nothing happens.
I even wonder if files in the IFS of an iSeries have extensions (?)



And can you please give me an example on how to search for a specific
string in the content of the file (so not in the filename itself) ?

Thanks a lot.
Guy






From: Michael Ryan <michaelrtr@xxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 18/01/2012 15:04
Subject: Re: Search in content of a IFS file
Sent by: midrange-l-bounces@xxxxxxxxxxxx



Use grep in QSH.

grep: 001-3010 usage: grep [-E | -F] [-c | -l | -q] [-ihnsvwxy] [-e
pattern_list] [-f pattern_file] [pattern] [file ...]

Like...

grep table /home/michael/*.php

/home/michael/dspcust.php:<table width="75%" border="1" cellspacing="1"
cellp
adding="1" bgcolor="#eeeeee">
/home/michael/dspcust.php:print("<b>The result of the ADDRFILE table query
is
:</b>\n");
/home/michael/dspcust.php:// Put the results in an HTML table
/home/michael/dspcust.php:</table>
/home/michael/dspsum.php:<table width="75%" border="1" cellspacing="1"
cellpa
dding="1" bgcolor="#eeeeee">
/home/michael/dspsum.php:print("<b>The result of the ADDRFILE table query
is:
</b>\n");
/home/michael/dspsum.php:// Put the results in an HTML table
/home/michael/dspsum.php:</table>
$

You can redirect the output to a file if you want...

grep table /home/michael/*.php > /home/michael/myfile.txt

On Wed, Jan 18, 2012 at 5:02 AM, Guy Geboers <Guy.Geboers@xxxxxxxxxxx>
wrote:
Hi,

In an IFS directory e.g. /M3BE/env/PRD/Output there are thousands of
files.

I need a list of all files which have the string "110000890" in their
content

Who can help me ?


thanks

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


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.