This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stty icrnl


Achim Gratz <Stromeko <at> NexGo.DE> writes:
> Is there some other terminal emulator/program that would let me use this
> board anyway via Cygwin until Cygwin learns cooked mode for terminals?

The following script does almost what I want, save for some ickyness with
the echo of the input that I might attempt to deal with later:

-----------8<-----------
#!/bin/dash
cleanup () {
    kill $cpid
    exec 6>&-
}
tty=$1; shift
baud=$1; shift
/bin/stty -F $tty $baud
exec 6<> $tty
0<&6 /bin/stdbuf -i0 -o0 -e0 tr "\r" "\n" &
cpid=$?
trap cleanup HUP KILL INT
1>&6 /bin/stdbuf -i0 -o0 -e0 tr "\n" "\r"
cleanup
-----------8<-----------

Anyway, I can communicate with the board and don't need to leave tmux
anymore when doing so.  :-)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]