This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: stty icrnl
- From: Helmut Karlowski <helmut dot karlowski at ish dot de>
- To: cygwin at cygwin dot com
- Cc: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- Date: Fri, 10 Jun 2016 10:42:32 +0200
- Subject: Re: stty icrnl
- Anomaly-results: submit.unitybox.de; rate=0%
- Authentication-results: sourceware.org; auth=none
- Dubio-filter: Adamant Filter v2016.04.1 submit.unitybox.de 3rQwfJ6rDlz7t8X
- References: <87fusm6mog dot fsf at Rainer dot invalid> <20160610083111 dot GC15058 at calimero dot vinschen dot de>
---------------------------------------------------
> Ideally by somebody who knows how this dreaded Windows serial line API
> works...
Wouldn't someting like this work:
term=$'\r'
l=
while true; do read -N1 c
[ "$c" == $'\4' ] && break
[ "$c" == $term ] && { echo "<$l>"; l=; } || l="$l$c"
done
?
-Helmut
--
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