This is a basic bash script that plays random song files inside the directory you're currently in when calling this file inside your terminal.
It's also possible to add a preferred path to the script from where the music should be played. When executing the script you'll be first asked if the music should be played from your preferred path.
You can press any key on your keyboard to skip a song!
For playing the songs afplay is being used & afinfo for querying the length of a specific song... In case you don't have it installed on your system either install it first or use something else instead