Appending filenames, not extensions
I had a group of files that I needed to append a suffix to, but leave the extension intact. Basically, I needed to split the filename and extension, then put them back together with some filling in the middle…
This answer @ stack overflow shows how to split them, and then it’s pretty easy to put them back together:
#!/bin/bash
FILLER='-1' # Whatever you want to append to the filename
for i in *
do
mv $i "${i%.*}$FILLER.${i##*.}"
done