Bash Add extension to all files

Having to add an extension to a series of files as they were produced by a splitting function and not in expected format

Here all files in the directory are read in as loop and then moved with the new file name by using the linux command basename of the current file and appending csv

  • What happens is loop over every file in current directory
  • Then get basename only and append .csv with the mv command
for f in *; do mv $f `basename $f.csv`; done;