sound=/home/r/tmp/data1.wav if [ -e $sound ] then aplay /home/r/tmp/data1.wav rm /home/r/tmp/data1.wav else echo "$sound does not exist." fi