4 replies
by stillatit
If the unix app prints to standard output (most do), redirect the output to a file, then mail to the file to whichever users need it, or mail them a notice.
Look at how the command is written now. If you see something like:
myapp | lp
That isrouting the output of myapp to the lp (line print) program. (lpr is another line print program). Replace the pipe to line print with a redirect symbol ">" and the path and file name where the output is to go.
In a batch file, do something like this:
#
# the following line runs myapp and shoves the output in a file: /tmp/myoutfile
/usr/local/bin/myapp >/tmp/myoutfile
#
# the folowing line mails the output
/usr/bin/mail -s "Myapp output" groupname
by mreid
This discussion is closed to new replies.
Trending Software posts
Sort by Trending