# bgzmod - run zmodem transfers in the background
#          called by zterm
ZDIR=/usr/lib/zterm
command="$1"
shift
case $command in
rz) ;;
sz) for i
    do
    files="$files $i"
    done
    ;;
*)  echo "Bad command - exiting" >/dev/tty
    exit 1;
    ;;
esac
$command -vvv $files # add more v's for more output (see /tmp/[rs]zlog)
#exec </dev/tty >/dev/tty
(${ZDIR}/bell;clr;echo "Zmodem Transfers Completed";echo "Exit to shell and type 'zterm' to enter terminal") >/dev/tty

