$ cat radio.sh #!/bin/bash base=/home/pi/ApplePi $base/initLCD $base/locateLCD 0 0 $base/printLCD "Start " I=0 while [ 1 ] do S="`sudo $base/getIR2 -h`" #+ if [ "${S}" = "NEC 2038C78679" ] then  if [ $I -lt 59 ]  then  I=`expr $I + 1`  echo Index=$I  $base/locateLCD 0 0  $base/printLCD "up "  echo `head -n $I $base/stations.txt | tail -n 1`  H=`head -n $I $base/list.txt | tail -n 1`  pkill vlc  sleep 1  vlc -I dummy --quiet --aout alsa --alsa-audio-device=hw:1,0 $H > /dev/null 2>&1 &  fi fi #- if [ "${S}" = "NEC 2038C78A75" ] then  if [ $I -gt 1 ]  then  I=`expr $I - 1`  echo Index=$I  $base/locateLCD 0 0  $base/printLCD "down "  echo `head -n $I $base/stations.txt | tail -n 1`  H=`head -n $I $base/list.txt | tail -n 1`  pkill vlc  sleep 1  vlc -I dummy --quiet --aout alsa --alsa-audio-device=hw:1,0 $H > /dev/null 2>&1 & fi fi # Mute if [ "${S}" = "NEC 2038C7837C" ] then  $base/locateLCD 0 0  $base/printLCD "Stop "  pkill vlc  echo Stop  exit fi sleep 1 done