How to do it…

  1. We will run the audio from the command line. For that, we will use SoX command-line player. After successful installation of sox and libsox-fmt-all, navigate to the directory where you have your audio files and run the following command to play all the .mp3 files:
$ play *mp3
  1. To play a specific song, run the following command:
$ play file_name.mp3

Get Bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.