I have a folder containing file file1.png, file2.png, ..., file5.png. I'd like to copy them into a new folder and rename them as file6.png to file10.png. The bash script I used was:
for i in `seq 1 5`;
k=$((i+5));
do cp src/file$i.png dst/file$k.png;
done;
However, the line k=$((i+5)) always says syntax error. Any ideas?
doshould come beforek=$((i+5))