Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!snorkelwacker!mit-eddie!rutgers!mephisto!udel!eplrx7!mroz From: mroz@eplrx7.uucp (Peter Mroz) Newsgroups: comp.unix.aix Subject: problem with Korn Shell and at Keywords: ksh at Message-ID: <1990Jul19.032950.2479@eplrx7.uucp> Date: 19 Jul 90 03:29:50 GMT Sender: usenet@ee.udel.EDU Organization: DuPont Engineering Physics Lab Lines: 39 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@uunet.uu.net | Consultant, Scicon mrozpa%wmvx@dupont.com | DuPont Building, D4078 | Wilmington, DE 19898 -- The UUCP Mailer