#! /bin/bash ttyport=/dev/ttyUSB20 snddev=plughw:0,0 track1=ew1ln-eng.wav track2=ew1ln-rus.wav #-------------------------- texton="---> TX ON" textoff="---> TX OFF" counter=1 Black="\033[0;30m" Blue="\033[0;34m" Green="\[\033[0;32m" Cyan="\033[0;36m" Red="\033[0;31m" Purple="\033[0;35m" Brown="\033[0;33m" LGray="\033[0;37m" DGray="\033[1;30m" LBlue="\033[1;34m" LGreen="\033[1;32m" LCyan="\033[1;36m" LRed="\033[1;31m" LPurple="\033[1;35m" Yellow="\033[1;33m" White="\033[1;37m" while [ "$input" != "q" ]; do echo -en $LGreen echo "---------CQ N $counter --------" echo -en $Yellow echo "(e-engl, r-rus, q-quit) >" read -rsn1 input echo -en $LRed case $input in "e" ) if ! ./ttyptt $ttyport 1 ; then exit fi; echo $texton; aplay -D $snddev $track1; ./ttyptt $ttyport 0; echo $textoff; let counter++;; "r" ) if ! ./ttyptt $ttyport 1 ; then exit fi; echo $texton; aplay -D $snddev $track2; ./ttyptt $ttyport 0; echo $textoff; let counter++;; esac done