Skip to content

Instantly share code, notes, and snippets.

@jamesdaily
Created September 11, 2019 14:31
Show Gist options
  • Save jamesdaily/40a3cf45cfede99eba5b416938a4f021 to your computer and use it in GitHub Desktop.
Save jamesdaily/40a3cf45cfede99eba5b416938a4f021 to your computer and use it in GitHub Desktop.
Bash command to lowercase the first line (column headers) of each CSV file in a directory, and export them to a "lower" subdirectory
for f in *.csv; do (head -n1 $f |tr '[A-Z]' '[a-z]'; tail -n +2 $f) > ./lower/$f; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment