I ran across this post: How can I retain the console input in mplayer when reading from stdin?
But the answer there doesn't work for me. (and I can't comment due to not enough rep)
I'm running the following command:
ls -l | grep -e mp3 -e wav | awk '{i=index($0,$9); $0=substr($0,i); printf "./"$0"\n"}' | grep " " | mplayer -playlist -
and this works fine. (minus controls)
I try this: (as proposed in the above question)
ls -l | grep -e mp3 -e wav | awk '{i=index($0,$9); $0=substr($0,i); printf "./"$0"\n"}' | grep " " | mplayer -playlist /dev/fd/3 3<&0 </dev/tty
and it gives me this:
Playing /dev/fd/./Pink Floyd - Another Brick in the Wall.mp3.
File not found: '/dev/fd/./Pink Floyd - Another Brick in the Wall.mp3'
Failed to open /dev/fd/./Pink Floyd - Another Brick in the Wall.mp3.
can someone explain what I am doing wrong (and how to fix it?)
Currently running ubuntu 12.10 using sh.