#!/bin/bash
#this example show how to play an mp3 file when hitting the "f" key
read -s -n1 -p "type letter" Key
case "$Key" in
"F" | "f" )
echo -e "\n"
echo -e "\n we have a $Key"
echo -e "\n"
/usr/bin/mpg123 -@ play.pls
clear
until [ "$Key" != "f" ]
# Tests condition at top of loop.
do
#echo -e "\a"
LoopKey=0
read -n1 -t1 LoopKey
if [ "$Key" != "$LoopKey" ]
then
Key="1"
fi
echo -e "\n loop"
echo " de key is > $Key"
echo " de loopkey is > $LoopKey"
done
;;
* )
# Default option.
# Empty input (hitting RETURN) fits here, too.
echo
echo "No Option!."
;;
esac
./my.sh