#!/sbin/sh # # play_au - Play an audio file to /dev/audio. # # Check if /dev/audio exits if [ ! -w /dev/audio ] ; then /usr/bin/echo "$0: Unable to play audio clip. /dev/audio does not exist!" exit 1 fi # Check if file exists if [ ! -r $1 ] ; then /usr/bin/echo "$0: $1 does not exist or is not readable." exit 1 fi # check if the file is an audio file? # play the file #/usr/bin/cat $1 > /dev/audio /usr/bin/audioplay $1