Created
November 24, 2014 09:44
-
-
Save RStrydom/a5f850b2bba96d8c2c17 to your computer and use it in GitHub Desktop.
Revisions
-
RStrydom created this gist
Nov 24, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #!/bin/bash for FILE in `ls` do # remove the last dot and subsequent chars, then add new ext DIR="${FILE%%.*}" DIR=${DIR,,} mkdir -p "$DIR" mv "$FILE" "$DIR" done