I have some files named:
0001.jpg
0002.jpg
...
0050.jpg
I need to increment that number by 35, so that I obtain:
0036.jpg
0037.jpg
...
0085.jpg
I thought of trying the following:
for i in {0001..0050}; do
mv -n $i $((i+35))
done
However I get the error bash: 0008: value too great for base (error token is "0008")
. I'm not sure I understand what the base
means here or how to get around it. I have seen this question. Although it explains the octal error, it is not immediately clear how it helps to iterate with a shifted index.