I have a directory full of music files that I want to play in mplayer. I want to play these files in order of their track number which is the forth field (space separated) in their filename. I know I could do something like this:
ls | sort -nk4 | playlist
and then
mplayer -playlist playlist
but I would like to be able to do it without creating a playlist file. The best I have so far is
ls | sort -nk4 | xargs -I{} mplayer {}
This seems to work but I am unable to use any of the normal mplayer controls. I am curious if this is possible. It seems it should be as you can type
mplayer songA.flac songB.flac songC.flac...
and it works fine.