Last active
September 12, 2016 12:00
-
-
Save edo9k/af4647eebb5f5660574fe34a996e1bec to your computer and use it in GitHub Desktop.
Bash one liner to crop all file names in one directory to the length specified in the 'cut' command. (This is done the hard & dumb way here, I'm pretty sure rename can do it better with the proper regex. I can't regex very that well.)
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
for i in $files; do echo "mv $i $(echo $i | cut -c 1-8)"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment