Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!munnari.oz.au!bruce!labtam!cnw01!nigel From: nigel@cnw01.storesys.coles.oz.au (Nigel Harwood) Newsgroups: comp.sys.ncr Subject: Bug in batch ? Message-ID: <1036@cnw01.storesys.coles.oz.au> Date: 6 Aug 90 06:14:02 GMT Organization: Coles Myer Ltd., Melbourne, Australia Lines: 60 I am experiencing a strange problem with jobs being run using batch. Firstly, the environment is Tower 32/600 1.03, Tower 32/650 2.01. The order of invocation is : login script1.sh LPI COBOL script2.sh script3.sh batch LPI run command Script1.sh is the signon script which starts a menu application written in LPI COBOL. The user makes a selection which starts script2.sh. Script2.sh runs a few COBOL programs and then runs script3.sh. Script3.sh consists only of a batch command with a here document. #/bin/sh # batch 1> /dev/null 2>&1 <xyz 2>&1 >xyz ! exit 0 The variable ABC contains "/usr/acct/abcde/bin". What happens is that every now and then I get a mail message from cron saying "lpirun not found [2]". Looking into the programs being run I have found that its not just one particular program, also re-running the program will produce a successful run. Certainly the re-directing of stdout twice is rather a strange thing for the developer to do, but why should it cause an intermittant problem. I tried it here and it doesn't seem to mind. I am also fairly satisified that the variable ABC is set correctly when the command is expanded by the shell in the here document. Also : o 99% of the systems reporting the error are the 2.01 systems. o Why should I get mail if the stdout/stderr are re-directed, sounds suspicious ? -- <<<<<<<<<<<<<<<<<<<<<<<<< Nigel Harwood >>>>>>>>>>>>>>>>>>>>>>>>>>> << Post: Coles Myer Ltd, PO Box 2000 Tooronga 3146, Australia >> << Phone: +61 3 829 6090 E-mail: nigel@cnw01.storesys.coles.oz.au >> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>