iSeries / AS400 FAQ : (Category) Programming : Where is the documentation for GREP?
grep is one of the Unix-like commands. It’s often presented as a solution for looking at files in the IFS. The V5R2 web page for grep is at http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzahz/grep.htm If you’re not a *nix person, it’s probably a good idea to review the QSH pages http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzahz/intro.htm You can navigate to them from the Information Center via Programming, Java, Qshell. Midrange Guru ran an tip on find and grep a while back, the URL is: http://www.midrangeserver.com/guruo/guruo011102.html The following example should work: find /QSYS.LIB/MYLIB.LIB/Q*.FILE -exec grep ‘searchstring’ {} \; Be aware that you will run many jobs doing this so you might read: http://www.midrangeserver.com/guruo/mgo022202-story01.html http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzahz/perform.
grep is one of the Unix-like commands. It’s often presented as a solution for looking at files in the IFS. The V5R2 web page for grep is at http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzahz/grep.htm If you’re not a *nix person, it’s probably a good idea to review the QSH pages http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzahz/intro.htm You can navigate to them from the Information Center via Programming, Java, Qshell. Midrange Guru ran an tip on find and grep a while back, the URL is: http://www.midrangeserver.com/guruo/guruo011102.html The following example should work: find /QSYS.LIB/MYLIB.LIB/Q*.FILE -exec grep ‘searchstring’ {} \; Be aware that you will run many jobs doing this so you might read: http://www.midrangeserver.com/guruo/mgo022202-story01.html http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzahz/perform.