delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/05/25/06:31:38

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=YRh98P8H1Yyn45wz
j/w5/pxM3gMpTA2UeCwAf8oZSwi2GLQCy6EOBJ6IU7wdGrClEePincAE04gt/Chg
q1EBRx56kF5bXSwYo1ggU3YkkgMIKvyH9Cv7PEmfbVCgVo5idHOxY/g3SdreCh7E
oL9lSCt0G7XQPztxrZTUXl+gLwY=
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=K4keGqcpqbTb2GUzNTad3r
GRKiA=; b=NBV4Jnltmc33DBzgmyewmeN6fLE4t/EdRWQEHv0RrXo6CHr2ZtAQkk
RelF3S380QDGfwGIacj7KtYfAFEMD8ic0zPbLrKcPrKT/i6kn9PrxQnpSNisENcU
0J2Ozjk5ldqEpvukzLGj2wCbgSid2tZfNte8Vro2+S09PMcftK+/0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=-6.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=hello!
X-HELO: mail-wm0-f41.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=YaUZFMJ6CUUXwXhWnXgd1pPdIkjU8g3RXgWf9782zwI=; b=R7dolgaDAWEnnf9/vd2vkWBXREg67Er/bn/mPJH55zkJSo6NFoJj6KJHZmyPLRVPpx 4F7z+BTfQUeI2i14kMIKQuXyUuxfUX+H2dypw1/+djM+M+1DqWLwX0J1kwaBQXYU7Y3x NbZxkZHltu8h5M/ia/nZB4In/5cOxzGgDDKUpfqi0T9a6X4Jm71Vo+HQLfNiskvT2q16 Yo5eEv444lgnYEexnDqINjvNhHiQhnAdPQXlQXFUUS+ybX+p87s0Zun0ffoRfHA4EgDK wdJWQ3YX3DJeO8eEjX/BSABbuZqOFJpp2iR3jI6u1E6j/hnGhrCd/qgD6WQ3RJ40kaKP jJ0Q==
X-Gm-Message-State: AODbwcATBMn6ocsCGaAQrPy6EosGRNIz0Vu645N75Pe4YBpebbljJ+MP yxanCu/ascHWtw==
X-Received: by 10.28.175.136 with SMTP id y130mr9971663wme.112.1495708279384; Thu, 25 May 2017 03:31:19 -0700 (PDT)
Subject: Re: Bug: bash -e misbehaves with several nested
To: Pavel Fedin <p DOT fedin AT samsung DOT com>, cygwin AT cygwin DOT com
References: <CGME20170524125429eucas1p1384ad5e0c60eb4974a0f57e0f0203d9a AT eucas1p1 DOT samsung DOT com> <000e01d2d48c$e16d1ca0$a44755e0$@samsung.com> <be033564-acfc-1d1a-bc4c-9cbbb73b155f AT gmail DOT com> <000e01d2d53d$57318470$05948d50$@samsung.com>
From: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Message-ID: <7eaf015c-431f-8a2e-1b2f-0db58d42df75@gmail.com>
Date: Thu, 25 May 2017 12:31:02 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <000e01d2d53d$57318470$05948d50$@samsung.com>
X-IsSubscribed: yes

On 25/05/2017 11:57, Pavel Fedin wrote:
>  Hello!
>
>>>  Hello! I'd like to report a strange bug in 64-bit bash. The following script:
>>>
>>> ---- cut ---
>>> #/bin/bash -e
>>>
>>> DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
>>> echo Works: $DIR
>>> ---- cut ---
>>>
>>> Simply exits and produces no output (never reaches echo). The same script works perfectly
>> on 32 bits. Versions are the same:
>>>
>>> --- cut ---
>>
>> It works fine for me.
>>
>> $ ./prova.bash
>> Works: /tmp
>
>  Huh, works here too, indeed. But there's one little thing. If you just copypasted this from my email, then you probably miss "#!"
> (there's just "#", since i retyped the header, and made a typo). And with this typo it really works for some reason. Could you make
> sure once again ?
>  Apparently it has to do with -e switch.



$ ./prova_bash
Works: /cygdrive/e/cygwin/tmp

$ cat prova_bash
#!/bin/bash -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo Works: $DIR



--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019