Last active
August 29, 2015 14:24
-
-
Save yehosef/00cb3bc71268e5811c04 to your computer and use it in GitHub Desktop.
organized files by date
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
#!/bin/bash | |
years=`seq 2014 2015` | |
months=`seq -w 01 12` | |
for year in ${years[@]}; do | |
mkdir $year | |
for month in ${months[@]}; do | |
mkdir $year/$month | |
mv $year-$month-* $year/$month | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment