X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=PIL9jLa3sLq3iDT1 mjIZR45BreVAXyuRxLPIemupmoSeKDqI8zJXTtRKQPA/Xu1AiQ6HXfA7GgvhCQgN w3mDNhMw5VqLsmfgHQAaamnVkWsf1qrsHkq3lY38pqG6b7mPA6i8SxodHbMWVYeB jtJMrVwsmJszmQKCf0ac6U/PDmo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=EfgVUks5EMM5RV6OkZz6H6 SNRD4=; b=pFNLWafff9UB62+GagxoyvmpNDeXATn68J8cuLMIierGj3dkHFS9sS tvEi3DsShergwUFtpwY82R/26x46Aruo6t/ZLhSbU3QO4+hg58+oRwuLBNF0/6AY sGoDKX27YvkNVlFgvW84GWKljmi3Cc0/G0HT7CnpGFiw8NR6SydO0= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=dawn, bicycle, H*MI:sk:1635303, Hx-spam-relays-external:209.85.214.48 X-HELO: mail-it0-f48.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=mbTsN6QsoM40Tg1rSVvsVZPDEF+NS6eXOI8r7jywOlE=; b=lNabkg06TIIMrAM4lEnAQ2yvAa9CCk7vF678z8r2sMdL9vbowO36mHhxSvOoYnuXLD bv1W1v+N3fuzFLgI4wMEvqqa1+kSeuIaCmv4DvE4TaFY2TSBVNuLjnpmGUPz2eeiUid0 Ir4A7MrYC6tS0/OWb8COw6XywfTtEzfJuqdM5gnhmEZSoXDRK0Fius1ZYNeOJZGO1J9U 5kplRK6WB1JDFsLR+Gkq2LpqnKoXLCtwIL1kF6EavytkbM9IxS525raySAxYRss78KYA uGhI9ivSPH+0ffZ/bv8tfJk6q0ckcEzdE9Gpc8xfSHZ5tLlE0Kuccl8J1oEEfX34UWSB z+nA== X-Gm-Message-State: AE9vXwPryrkJAUDe9959vSUrQky2b9W9oKnoEO4Y4RtkJgXZPw8zys1/9x38SjC4vN/9OA== X-Received: by 10.36.31.18 with SMTP id d18mr15315555itd.84.1472476008643; Mon, 29 Aug 2016 06:06:48 -0700 (PDT) Subject: Re: Script broken after updating bash to 4.3.46-7? To: cygwin AT cygwin DOT com References: <1635303092 DOT 20160827191501 AT yandex DOT ru> From: cyg Simple Message-ID: <3ddc1bf3-7226-b163-fd51-cf0c22f850c7@gmail.com> Date: Mon, 29 Aug 2016 09:07:03 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1635303092.20160827191501@yandex.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes On 8/27/2016 12:15 PM, Andrey Repin wrote: > Greetings, Gene Pavlovsky! > >> Looks like it's related to a recent change in bash, which is `read` >> now honors Cygwin-specific `igncr` shell option (`set -o igncr`), >> which I didn't enable. >> Adding `set -o igncr` to the top of the script does the job, however >> I'd like to know how many more scripts are potentially malfunctioning >> now? >> It's lucky that one sent e-mails on errors, some others might just >> break silently. >> Is it advisable to add `set -o igncr` to /etc/profile or SHELLOPTS? I >> didn't use that feature before and am worried about some other >> negative side effects. > > It is advisable to not have CR's in your scripts to begin with. > I thought this was about the data the script was reading and not the script itself. Data can have \r regardless of where in the data it exists. That said relying on defaults for a process has been taboo since the dawn of computing. Often defaults change on a whim, they are bicycle shed colors, a maintainer may prefer blue instead of red in any given release. If your script requires a specific mode for the shell to process data properly then be sure to set it before reading the data. -- cyg Simple -- 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