[comp.sys.ncr] UNIX Batch Bug Tracked Down

nigel@cnw01.storesys.coles.oz.au (Nigel Harwood) (11/22/90)

For you folks out there that have tried to assist me with a
problem I have been having over the last 6 months with
batch jobs under Tower 32 UNIX version 1.03 being corrupted,
here is the bug in all its glory.

I cannot explain the behaviour but at least now that I know
under what stone the little fella lives I can avoid him.

To get to the point, the bug is triggered by having a command
in your batch script which requires tty input.

If this happens batch will then proceed to do weird things to
your previously sensible shell script.

To test for the bug create a script called say 'nrh' with
the lines :

batch <<!
nrh1.sh
#######################################################################
##############
echo BUG NO
!

Make sure that you key in all the #'s as these are important.

Next create another script called say 'nrh1.sh' with the
single line :

read abcd

What you should see in your mail returned from batch if you
do not have the problem is "BUG NO" if you do have the problem
then you will see "BUG".

Perhaps someone with access to the source could enlighten me further.

Regards
-- 
<<<<<<<<<<<<<<<<<<<<<<<<<  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 >>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>