[comp.sys.apollo] bourne shell script problem

larss@nada.kth.se (Lars Schylberg) (05/30/90)

My problem is in a bourne shell 
where I tried to do something like

#!/bin/sh
while true
do
i=`known_c_program_that_results_in_number << 'EOF'
Data
Data
DATA
EOF
`
if [ $i -eq 6 ]
  my_selections ......
fi
done

this script produced two error that it shouldn't

Dmen: /tmp/sh1.36740: cannot open
test: too many arguments

1:  I wonder if there exists some known bugs with bourne shell scripts.
I know that my process number is 3674 for that process. Why is it adding
a 0 to this temp file.  I don't have difficulties using /tmp otherwise myself.

2:  Why can't I use test like this in the if statement?
It works on other machines.  I'm running SR10.2 on a DN3500 and BSD4.3.

Thanks in advance

Lars







-- 
Lars Schylberg                        Email: larss@nada.kth.se   (Internet)
Department of Photogrammetry                 larss@sekth.bitnet  (Bitnet)
Royal Institute of Technology         Tel.   +46 8 790 86 33     (office)
S-100 44  STOCKHOLM, SWEDEN           Fax.   +46 8 10 91 99