I have multiple files all named
seperate1
seperate2
etc. How do I rename them all to have the extension .csv
?
If there are only files which shall be renamed:
for file in *; do
mv "$file" "${file}.csv"
done
If there are files with a dot which must be excluded:
for file in *; do
[[ $file == *.* ]] && continue
mv "$file" "${file}.csv"
done
Or with shopt -s extglob
:
for file in +([^.]); do
mv "$file" "${file}.csv"
done