Last active
September 9, 2016 12:09
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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