Is there a way to rename a directory full of files named with the following convention, without using regex? For instance, I have files named 1.json, 2.json, 3.json, 4.json and I want them all renamed to their current #{NUM} to #{NUM - 1} so the result set would be: 0.json, 1.json, 2.json, 3.json.
Using the convention:
for i in *.json; do mv -- "$i" ..
Is it possible to do this without regex? Or am I stuck parsing for the file name, converting a string to integer and going from there?