Created
February 28, 2020 07:35
-
-
Save smilingkylan/4d8f4157f1adc7752892a13210ccedff to your computer and use it in GitHub Desktop.
Useful Filename Manipulation Bash Scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Each note separates the command from all the others in this file | |
# You are only meant to use one command / clause at a time | |
# Add 'Saga' to each filename before the extension | |
for f in *; do mv "$f" "${f}Saga"; done | |
# Capitalize first letter of each filename in folder | |
for f in * ; do | |
mv -- "$f" "$(tr [:lower:] [:upper:] <<< "${f:0:1}")${f:1}" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment