There is a script for downloading a file from a remote server . At startup, writes Illegal number: 100*1024*1024 . What could be the problem?
#!/bin/bash u=$1 [ -n "$u" ] || { echo "использование: $0 адрес"; exit 1; } n=0 p="часть" s=100*1024*1024 while true; do printf -vf "%s%0.3d" $p $n echo -n "скачиваем $f" if ! curl -s -f -r $((n*s))-$(((n+1)*s-1)) "$u" > "$f"; then exit $?; fi echo ". готово. следующий номер: $((++n))" done
dasherror:dash -c 's=1+1; echo $((s))'dash -c 's=1+1; echo $((s))'printsdash: 1: Illegal number: 1+1- Alexey Tenshisdash. Runbash 1.sh ..., and better make the script executable and run./1.sh ...- Alexey Ten$((100*1024*1024))than not arranged? - 0andriy