Sure, you can redirect pretty much anything in Qshell to a file. Just use the redirection operators. (The following should all be on one line, in case the e-mail software wraps it)

Assuming that you just want to save error messages (which go to stderr, which id descriptor #2) you'd code this:

find (parameters here) 2> /tmp/errors.txt

In that syntax, anything written to descriptor 2 (which is where erorr messages go) is redirected to the /tmp/errors.txt file in the IFS.

Normal (non-error) messages are written to stdout, which is descriptor #1, which you can redirect the same way, or you can omit the descriptor number, since it's the default:

find (parameters here) > /tmp/errors.txt

If you're calling 'find' from a CL program, it might be easier to use OVRDBF or OVRPRTF instead. For example:

STRQSH CMD('find (parameters here)')

You can override STDOUT as well (just specify STDOUT instead of STDERR) and you can use OVRPRTF if you want to write the results to the spool instead of writing it to a database file.

So... lots of options :)

Albert York wrote:
Thanks Scott,

Is there a way to pipe the output of this to a file?


This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by 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].