Directory "$d" contains a few thousand e-mail files with the .txt extension. To open them in my e-mail client, I need to rename them to .eml
Will this command rename them correctly:
find "${d}" -type f -name '*.txt' | while read f; do mv -vn "${f}" "${f%.*}".eml; done
or is there a better, more robust way to do this?
I could not think of an elegant way of doing this using:
-exec ...{}... \;