I am using cygwin for shell programming and this is my first program and i can't understand the error mentioned in the title at line 4 in for loop.here is the code
ski=0
wski=1
rwski=950435
for (( i = 1; i < 77; i++ ))
do
if [ $i -lt 45] ; then
dd if=3d.jpg ibs=1024 count=1 skip=$ski of=myimage.dd obs=1024 seek=$wski conv=notrunc
expr $ski = $i
expr $wski = $wski + $i
else
expr $rwski = $rwski - $i
expr $ski = $i
dd if=3d.jpg ibs=1024 count=1 skip=$ski of=myimage.dd obs=1024 seek=$rwski conv=notrunc
fi
done
can someone please help me to correct this.
regards,
w
#!/bin/bash -xor do aset -vxat the top of your script. Then watch the output and verify that everything is expanded as expected