From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60399 invoked by alias); 10 Jun 2016 08:42:48 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 60375 invoked by uid 89); 10 Jun 2016 08:42:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_40,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=lc, HCc:D*cygwin.com, H*i:sk:2016061, H*f:sk:2016061 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mailout.ish.de Received: from mailout.ish.de (HELO mailout.ish.de) (80.69.98.252) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 10 Jun 2016 08:42:37 +0000 Received: from submit.unitybox.de (submit.unitybox.de [80.69.98.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.ish.de (Postfix) with ESMTPS id 3rQwYp0VRmzBMcFG; Fri, 10 Jun 2016 10:38:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by submit.unitybox.de (Postfix) with ESMTP id 3rQwfK2NQtz7tCM; Fri, 10 Jun 2016 10:42:33 +0200 (CEST) Received: from submit.unitybox.de ([127.0.0.1]) by localhost (submit.unitybox.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PszfSOrBGJhl; Fri, 10 Jun 2016 10:42:33 +0200 (CEST) X-Abuse-ID: hremUFXL0y-8240@umkbw.customer Anomaly-Results: submit.unitybox.de; rate=0% Dubio-Filter: Adamant Filter v2016.04.1 submit.unitybox.de 3rQwfJ6rDlz7t8X Received: from ish.de (ip-88-152-162-41.hsi03.unitymediagroup.de [88.152.162.41]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submit.unitybox.de (Postfix) with ESMTPSA id 3rQwfJ6rDlz7t8X; Fri, 10 Jun 2016 10:42:32 +0200 (CEST) From: Helmut Karlowski To: cygwin@cygwin.com Cc: Corinna Vinschen Subject: Re: stty icrnl Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <20160610083111.GC15058@calimero.vinschen.de> References: <87fusm6mog.fsf@Rainer.invalid> <20160610083111.GC15058@calimero.vinschen.de> Date: Fri, 10 Jun 2016 08:57:00 -0000 Message-Id: <20160610104232.488C0330.helmut.karlowski@ish.de> MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00157.txt.bz2 --------------------------------------------------- > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60407 invoked by alias); 10 Jun 2016 08:42:48 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 60388 invoked by uid 9078); 10 Jun 2016 08:42:48 -0000 Received: (qmail 60375 invoked by uid 89); 10 Jun 2016 08:42:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_40,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=lc, HCc:D*cygwin.com, H*i:sk:2016061, H*f:sk:2016061 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mailout.ish.de Received: from mailout.ish.de (HELO mailout.ish.de) (80.69.98.252) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 10 Jun 2016 08:42:37 +0000 Received: from submit.unitybox.de (submit.unitybox.de [80.69.98.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.ish.de (Postfix) with ESMTPS id 3rQwYp0VRmzBMcFG; Fri, 10 Jun 2016 10:38:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by submit.unitybox.de (Postfix) with ESMTP id 3rQwfK2NQtz7tCM; Fri, 10 Jun 2016 10:42:33 +0200 (CEST) Received: from submit.unitybox.de ([127.0.0.1]) by localhost (submit.unitybox.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PszfSOrBGJhl; Fri, 10 Jun 2016 10:42:33 +0200 (CEST) X-Abuse-ID: hremUFXL0y-8240@umkbw.customer Anomaly-Results: submit.unitybox.de; rate=0% Dubio-Filter: Adamant Filter v2016.04.1 submit.unitybox.de 3rQwfJ6rDlz7t8X Received: from ish.de (ip-88-152-162-41.hsi03.unitymediagroup.de [88.152.162.41]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submit.unitybox.de (Postfix) with ESMTPSA id 3rQwfJ6rDlz7t8X; Fri, 10 Jun 2016 10:42:32 +0200 (CEST) From: Helmut Karlowski To: cygwin@cygwin.com Cc: Corinna Vinschen Subject: Re: stty icrnl Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <20160610083111.GC15058@calimero.vinschen.de> References: <87fusm6mog.fsf@Rainer.invalid> <20160610083111.GC15058@calimero.vinschen.de> Date: Fri, 10 Jun 2016 10:00:00 -0000 Message-ID: <20160610104232.488C0330.helmut.karlowski@ish.de> MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00158.txt.bz2 Message-ID: <20160610100000.BPHG6MoIRxQA5vznrKJujM1ipUeD4plK0vU0DVK8Oto@z> --------------------------------------------------- > 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