|
Hi Peter,
when I execute the command from an OS400 line, I only get the message
"Command ended normally with exit status 1", nothing else
Guy
From: Peter Dow<petercdow@xxxxxxxxx>
To: midrange-l@xxxxxxxxxxxx
Date: 18/01/2012 23:18
Subject: Re: Search in content of a IFS file
Sent by: midrange-l-bounces+guy.geboers=sibelco.com@xxxxxxxxxxxx
Or from an OS400 command line:
QSH CMD('grep 110000890 /M3BE/env/PRD/Output')
On 1/18/2012 6:23 AM, Michael Ryan wrote:
That example showed looking for the string 'table' in all the .phpwrote:
files in directory /home/michael. the output of the command shows the
name of the file '/home/michael/dspcust.php:' and the line containing
the search string '// Put the results in an HTML table'. There are
multiple results.
You would do this:
grep 110000890<files in which to search>
Files in the IFS may or may not have extensions, just like Windows or
*NIX files.
On Wed, Jan 18, 2012 at 9:19 AM, Guy Geboers<Guy.Geboers@xxxxxxxxxxx>
queryHi,
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
queryis
:</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
listis:
</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.txtOn Wed, Jan 18, 2012 at 5:02 AM, Guy Geboers<Guy.Geboers@xxxxxxxxxxx>
wrote:
Hi,list
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
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.
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.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
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 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.