I am getting Getting (standard_in) 1: parse error with below code.
#!/bin/sh
base=01C71C
mid=0
end=0
for mid in {0..15..1}
do
for end in {0..15..4}
do
if (( mid > 9 ))
then
mid_hex=`echo "obase=16;ibase=10; $mid" | bc`
else
mid_hex=$mid
fi
end_hex=`echo "obase=16;ibase=10; $end" | bc`
reg=$base$mid_hex$end_hex
phymem32 $reg >> osd.txt
done
done
Please guide me where I am wrong and what alternatives can be made here to make it work same. Thank.