Skip to content

Instantly share code, notes, and snippets.

@cjerdonek
Created July 14, 2012 14:00
Show Gist options
  • Save cjerdonek/3111488 to your computer and use it in GitHub Desktop.
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.
# 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