I'm using the following bash script on a mac to rename files using a list of file names. It works and doesn't throw an error but when it's finished all the files (which are images) have a question mark following the extension and don't know what application they need to use to open. This does not happen when I manually type in mv oldName.TIF newName.TIF
into the command line. Help?
#!/bin/bash
printf "%s\n" *.TIF | paste - names.txt | while IFS=$'\t' read -r old new;
do
mv "$old" "$new";
done