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



On 5/19/2015 12:09 PM, Dan wrote:
Wow, good stuff. I am absolutely deficient in the ways of qshell and
regex, so thank you for breaking down and explaining this, Buck!

Should have tried this on a smaller source file first. It appears a job
log for job QP0ZSPWP was created for every single member. Need to turn off
job logging.

Is there a way to redirect the output on the screen to a file?

I just submit it to batch:
SBMJOB CMD(QSH CMD('echo "Lasciate ogni speranza"')) JOB(QSHTEST)
JOBQ(QS36EVOKE)


Generally speaking, I wouldn't run a complex thing off a Qsh command
line; I'd write a script file. (Talk about someone having a one-track
mind!)

#!/usr/bin/bash
echo "Processing library $1"
for file in /qsys.lib/$1.lib/qrpglesrc.file/*
do
echo $file
cat $file | egrep -v "^......\*.*|^.*\/\/.*" | grep -i "*mdy"
done

I did this using Notepad++ with Unix style line endings. It runs in Qsh
by ./search.sh library_to_search

But the idea wasn't to propose this as the be-all, rather it shows how a
guy with a one track mind can turn any chore into a job for scripting
:-) You could use Perl, Python or PHP to do most of the same things;
probably easier to read too. I just had a mental grip on regular
expressions that I couldn't shake.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.