Tuesday, July 29, 2008

play all mp3s below a certain directory

(requires mpg123)

In bash, define the function myplay:

function myplay() { tmp=`mktemp`; find "`pwd`/$1" -name "*.mp3" | sort > $tmp; mpg123 -C -@ $tmp; rm $tmp ;}

Then simply use myplay dir/to/music. (This only works with relative paths.)

No comments: