From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106047 invoked by alias); 11 Sep 2015 11:17:38 -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 106038 invoked by uid 89); 11 Sep 2015 11:17:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: smtp35.i.mail.ru Received: from smtp35.i.mail.ru (HELO smtp35.i.mail.ru) (94.100.177.95) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 11 Sep 2015 11:17:36 +0000 Received: from broadband-188-32-158-234.nationalcablenetworks.ru ([188.32.158.234]:50458 helo=U250) by smtp35.i.mail.ru with esmtpa (envelope-from ) id 1ZaMKi-00074e-5q for cygwin@cygwin.com; Fri, 11 Sep 2015 14:17:32 +0300 Date: Fri, 11 Sep 2015 11:17:00 -0000 From: Mikhail Usenko To: cygwin@cygwin.com Subject: Re: [ANNOUNCEMENT] Updated: bash-4.3.42-3 Message-Id: <20150911141729.0318b690929d91edcee250bd@inbox.ru> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00182.txt.bz2 On Tue, 25 Aug 2015 14:19:54 -0600 Eric Blake (cygwin) <...> wrote: > A new release of bash, 4.3.42-3, has been uploaded and will soon reach a > mirror near you; leaving 4.3.39-2 as the previous version. > It is one more buggy release (cygwin-specific). ---8<---(cygwin-test.sh)---8<--- #! /bin/bash sender() { echo -n '\r\n' >&2 echo -ne '\r\n' sleep 1 echo -n '\r\r\n' >&2 echo -ne '\r\r\n' sleep 1 echo -n '\r\r\r\n' >&2 echo -ne '\r\r\r\n' sleep 1 } receiver() { t="" while read t || [ "$t" ]; do echo -n ": " od -A n -t x1 <<<"$t" done >&2 } # implicit pipe receiver < <(sender) # explicit pipeline sender | receiver --->8---(cygwin-test.sh)--->8--- $ ./cygwin-test.sh \r\n: 0a \r\r\n: 0d 0d 0a \r\r\r\n: 0d 0d 0a \r\n: 0a \r\r\n: 0d 0d 0a \r\r\r\n: 0d 0d 0a There is also the similar problem found accidentally just now with sed in pipelines: $ echo -ne "\r\n" | sed '' | od -A n -tx1 # should be: 0d 0a 0a $ echo -ne "\r\r\n" | sed '' | od -A n -tx1 # should be: 0d 0d 0a 0d 0a On Thu, 04 Jun 2015 06:16:04 -0600 Eric Blake <...> wrote: > > 'echo -ne' is non-portable (I can break it with 'shopt -s xpg_echo'); > get used to using 'printf' instead. > xpg_echo doesn't change 'echo -ne' behavior ('echo -e' force backslash-escape sequences expansion independently) $ shopt xpg_echo xpg_echo off $ echo -e '\r\n' | od -tx1 0000000 0d 0a 0a 0000003 $ shopt -s xpg_echo $ shopt xpg_echo xpg_echo on $ echo -e '\r\n' | od -tx1 0000000 0d 0a 0a 0000003 $ echo '\r\n' | od -tx1 0000000 0d 0a 0a 0000003 -- Mike -- 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