Last active
December 22, 2015 19:39
-
-
Save ik5/6521481 to your computer and use it in GitHub Desktop.
Take wav files from current directory and place them in directories based on month and day
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
#!/bin/bash | |
for i in *wav ; do | |
date=$(stat -c '%y' $i | cut -f 1 -d ' ' ) | |
dir="${date:5:2}/${date:8:2}" | |
echo "$date $dir $i" | |
mkdir -p $dir | |
mv $i $dir | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment