Created
January 29, 2013 07:57
-
-
Save talpah/4662571 to your computer and use it in GitHub Desktop.
simple bash commands to recreate directory structure from a cloned gist (only condition is that you don't have underscores in the original filenames)
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
for f in *; do a=$(echo $f | cut -d '_' --output-delimiter='/' -f 2-); b=$(dirname $a); mkdir -p $b; mv $f $a; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment