Created
February 10, 2016 11:41
-
-
Save djhojd/36ae7d35fb75a76358af to your computer and use it in GitHub Desktop.
find mp3/flac, sort by last access time, take top 10, sort random, play
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 | |
while true; do | |
find ./ -regex '.*\.\(mp3\|flac\)' -printf '%T+ %p\n' | sort | head -n 10 | sort --random-sort | while read f; do | |
mplayer -quiet "$f" </dev/tty; | |
touch "$f"; | |
done | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment