Skip to content

Instantly share code, notes, and snippets.

@EddiG
Created March 5, 2021 11:06
Show Gist options
  • Save EddiG/c8217f74f348ea5b3a5ab27e3cdaf7e5 to your computer and use it in GitHub Desktop.
Save EddiG/c8217f74f348ea5b3a5ab27e3cdaf7e5 to your computer and use it in GitHub Desktop.

Cheatsheets

Lowercase the filename

for file in *.png; do mv $file ${file:l}; done

Uppercase the filename

for file in *.png; do mv $file ${file:u}; done

Uppercase the filename only (without extension)

for file in *.png; do mv $file ${file:t:r:u}; done

Uppercase the extension only (without filename)

for file in *.png; do mv $file ${file:t:e:u}; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment