Skip to content

Instantly share code, notes, and snippets.

@griffio
Last active September 9, 2016 12:09
Show Gist options
  • Save griffio/c67ef387c8a8feb1f75d1db215ab12f9 to your computer and use it in GitHub Desktop.
Save griffio/c67ef387c8a8feb1f75d1db215ab12f9 to your computer and use it in GitHub Desktop.
plays aiff, mp3 or m4a - arguments files and folders - using OSX afplay, can also be used in an Automator script application
#!/bin/bash
for arg in "$@"
do
if [[ -d "$arg" ]]
then
find "$arg" \( -name "*.aiff" -o -name "*.mp3" -o -name "*.m4a" \) -exec afplay --rQuality 1 {} \;
else
afplay --rQuality 1 "$arg"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment