0

On my Linux machine, I am trying to shuffle all music in my directory and play it. When I run omxplayer $(ls -1b |sort -R), it says /usr/bin/omxplayer.bin: invalid option -- '\'. This doesn't make sense. omxplayer should run the output of ls -1b which should show the output of the directory in 1 column and show escape characters so it would recognize the spaces. What am I doing wrong and how else could I shuffle all music in my directory and play it?

1
  • Doesn't omxplayer have an inherent shuffle option? All other media players I know have one. Try man omxplayer | grep -i shuffle or omxplayer --help – Mio Rin Mar 25 '17 at 18:31
0

omxplayer "$(ls | shuf -n 1)" should work.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.