mail redirection using batch command

From: Bill Rhode (Bill.Rhode@SUNGARD.COM)
Date: Fri Jan 02 2004 - 17:47:44 EST


I am having unexpected results on AIX 5.2 using the batch command as demo'd
in this "test" script.../
batch <<!!
xx 1>> nohup1 2>> nohup2
!!

My object is to route stderr and stdout to a disk file instead of to the
user mailbox. It routes to both however. In the example, the nohup2 file
contains the message "ksh[4]: xx: not found.". The mailbox output and
relevent "man at" paragraph are below. Grateful for any input.

MAILBOX ENTRY...
Received: (from username@localhost) by aixdev2.company.com (AIX5.2/8.11.0
/8.1
1.0) id i02M6Xq18438 for username; Fri, 2 Jan 2004 16:06:33 -0600
Date: Fri, 2 Jan 2004 16:06:33 -0600
From: username
Message-Id: <200401022206.i02M6Xq18438@aixdev2.company.com>
To: username

cron: Job username.1073081193.b was run.

MAN ENTRY...
The at command mails you all output from standard output and standard error
for
the scheduled commands, unless you redirect that output. It also writes the
job
number and the scheduled time to standard error.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:26 EDT