152 Geac System21 commerce.connect: Implementation on the iSeries Server
The following Qshell command runs the script myscript.sh and sends both standard output
and standard error to the file myscript.out:
myscript.sh > redirect.out 2>&1
If the file used for redirection already exists, then it is overwritten. If you want to append to the
file rather than to overwrite it, use >> or 2>>. The following command is similar to the previous
example, but appends the output to the file:
myscript.sh >> redirect.out 2>&1
If you want to run this script from a CL program or an OS/400 command line, then you can
use the following command:
QSH CMD(‘/mydirectory/myscript.sh >> redirect.out 2>&1’)
The script is qualified since it is usually easier in this conte ...