Skip to content

Instantly share code, notes, and snippets.

@jabley
Created September 14, 2012 15:25
Show Gist options
  • Save jabley/3722616 to your computer and use it in GitHub Desktop.
Save jabley/3722616 to your computer and use it in GitHub Desktop.
bash script to rename files with extension handling
for f in $(ls); do table="${f%.*}"; mv "${table}.csv" "${table}_DATA_TABLE.csv"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment