Created
July 14, 2012 14:00
-
-
Save cjerdonek/3111488 to your computer and use it in GitHub Desktop.
Bash shell script to strip a fixed-length prefix from the names of directories in a directory.
This file contains hidden or 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
# Bash shell script to strip a fixed-length prefix from the | |
# names of directories in a directory. | |
dir_names=`ls -d` | |
for dir_name in $dir_names | |
do | |
mv $dir_name ${dir_name:7} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment