[ILUG-BOM] bc and bash scripting woes
Parvez Lanewala
parvez@[EMAIL-PROTECTED]
Tue Jan 15 18:38:03 IST 2002
hi luggers,
i'm having a problem with the following code...
--snip--
for i in `seq 0 10`;
do
SUM=`echo $SUM+${ARR[$i]}|bc`
done
--snip--
error says : (standard_in) 1: parse error
although the segment
echo $SUM+${ARR[$i]}|bc
works fine outside the for loop. any hints on why and how i can avoid it.
thanks,
parvez
--
It's pretty hard to tell what does bring happiness; poverty and wealth have both failed. -- Kim Hubbard
More information about the Linuxers
mailing list