1dd7040f

ТЕКСТ ПРОГРАММЫ


1 : 2 # @(#) talk v1.0 Talk to the serial port Author: Russ Sage Обращение к последовательному порту

4 BAUD="1200" 5 TTY="tty11" 6 PIPE=""

8 for ARG in $@ 9 do 10 case $ARG in 11 -b*) BAUD="`echo $ARG|cut -c3-`";; 12 -l) echo "logging in /tmp/talk.$$" 13 PIPE="| tee /tmp/talk.$$";; 14 -t*) TTY="tty`echo $ARG|cut -c3-`";; 15 -u) BAUD="9600";; 16 *) echo "talk: invalid argument $ARG" >&2 17 echo "usage: talk [-bBAUD] [-l] [-tTTY] [-u]" >&2 18 echo " -b baud rate" >&2 19 echo " -l log the output" >&2 20 echo " -t use another tty" >&2 21 echo " -u 9600 baud to UNIX" >&2 22 exit 1;; 23 esac 24 done

26 eval cu -s$BAUD -l$TTY dir $PIPE




Начало  Назад  Вперед