stty icrnl
Achim Gratz
Stromeko@NexGo.DE
Tue Jun 7 09:31:00 GMT 2016
For the record, this is what I ended up with:
-----------8<-----------
#!/bin/dash
cleanup () {
/bin/kill $cpid
exec 6<&- 6>&-
/bin/stty $stty
}
if [ $# -ne 2 ] ; then
echo "Usage: ${0##*/} <TTY> <Baud>"
exit 1
fi
tty=1ドル; shift
baud=1ドル; shift
stty=$(/bin/stty -g)
/bin/stty -icanon -echo
/bin/stty -F $tty $baud
exec 6<> $tty
0<&6 stdbuf -i0 -o0 -e0 tr "\r" "\n" &
cpid=$?
trap cleanup HUP KILL INT
1>&6 stdbuf -i0 -o0 -e0 tr "\n177円" "\r\b"
cleanup
----------->8-----------
The only thing missing is to emulate the effect of the "stty echoe" setting,
that is outputting erase as backspace - space - backspace rather than just a
single backspace.
Regards,
Achim
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list