Zend certified PHP/Magento developer

How to get a random filename from a directory and using it within a command?

play ~/Music/audio0.flac repeat -

A command for playing a single specific audio file on repeat.

play ~/Music/${random_audio_file} repeat -

A pseudo command for playing a single random audio file from the given directory (~/Music/), also on repeat.


How to do the latter as a real working command?