problem with Korn Shell and at
Peter Mroz
mroz at eplrx7.uucp
Thu Jul 19 13:29:50 AEST 1990
I've been having a problem with ksh and at. I'm using AIX 9013 on an IBM
320 RS/6000. I execute the shell-script below with the at command:
$ echo "ksh testbug" | at now +1 minute
Here's testbug:
--------------------------------------------------------------------
#!/bin/ksh
current_date=$(date | cut -c5-10)
logfile=/u/userid/test.log
job_to_do=/u/userid/something
if [ -r $logfile ]
then
rm $logfile
fi
print "testbug: running $job_to_do on $(date)" > $logfile
print "current_date = $current_date" >> $logfile
--------------------------------------------------------------------
testbug is a piece of a larger shell script but this demonstrates the bug.
The logfile gets owned by root and the group is cron. This doesn't surprise
me, but is there a way I can be the owner?
The real problem is that the logfile looks like this:
testbug: running /u/userid/something on
current_date =
ie there's no date at the end of either line.
If i run this interactively there's no problem. Am I doing something wrong
here? Is this a bug in 9013? Thanks for any help.
--
Peter Mroz | E.I. Du Pont de Nemours & Co.
eplrx7!mroz at uunet.uu.net | Consultant, Scicon
mrozpa%wmvx at dupont.com | DuPont Building, D4078
| Wilmington, DE 19898
--
The UUCP Mailer
More information about the Comp.unix.aix
mailing list