Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15314

Re: Filename expansion bug

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Stephane Chazelas <stephane.chazelas@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: Filename expansion bug
Date Thu, 8 Aug 2019 16:07:39 +0100
Lines 47
Approved bug-bash@gnu.org
Message-ID <mailman.1068.1565276870.1985.bug-bash@gnu.org> (permalink)
References <CABN8V7MFbLErHGDJTq0fsBJwS8nofcT8+jcd1LQf1QBq_GTPHQ@mail.gmail.com> <20190808143848.GD1218@eeg.ccf.org> <20190808150739.tax42js5akbai6z6@chaz.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1565276870 29824 209.51.188.17 (8 Aug 2019 15:07:50 GMT)
X-Complaints-To action@cs.stanford.edu
To Janek Mi <janekmi@gmail.com>, bug-bash@gnu.org, marcin.slusarz@gmail.com
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=f/48ZNRYiOiolWAVOsPq0+8gwvoG0wY4l5HUzPi/4LE=; b=myB9zeXjvsunQzpKIDL5tRVvuGmDSXUaWrdBKYaL6aN2TtIucS8pd8x4NfxAuNPkvr onF6xkl1UOYPMYiU6k3q03wEeNbEPl/mh5aT0sj+4i+ETj3LymY7mBiabDjD5mz/aAcc KZoX4ijetex3CQ5pQmEt/XjAgEmTWOd4PsZnDJcoAXXrDua1I2avPAJ8lPtKX/tZ9BhY iCd5kAiqTpI+kDBLv8s0HTQHrHJv68VQ7OqU+1HcSfY39Qa3JQ2kRDDIL/Vu58h5wnWH Q65VxJZimV/jVFZnhja4ItcfBVuQGFG0Ce61lekk0VKV6H/JSwfSLQBLj4tqLR6Hs1z6 0p4g==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=f/48ZNRYiOiolWAVOsPq0+8gwvoG0wY4l5HUzPi/4LE=; b=SWRjItQDM/8tmIerhgHQ8Tm8sBzQtx5aGXOaB8/kvJg2H313yfADEaSa8HYmpGzm7k wEPq6JaYknZ5twjeE1ZkOPRD2c12T4SRw3fBMJXDKc2JtVlYMaJuykiC3zCLCmbyWKaA 8swjYttDCEpS/nymB7kJrQUK5COlTDxQ9ylo13DsNhYS61/RUGrjs9fSOkWarabVyUIk r+amGc3fZcs3OcKNS94/HlKJrKMHaKr9pE2U6/3ds/pEBqQkS6aay2IMKW4ZJVtuLC4g m8llV2vrdE2wM5SvDdqvfzdCfXolc8QOAobecAeMygKWLd6tLvMhAdyokHHIEMZbE47o BUrQ==
X-Gm-Message-State APjAAAVCoaHbASG+/4Vnv/yKuIUQMOzGSQQ2nfcA6tD/TCON7buHEy5i lKZXELRYa+LHgllcp0ZfrYQ=
X-Google-Smtp-Source APXvYqzh/V/Sq3lBLMaKxfFKr5Qs8lIoPnQKrNfc/D+kCSHg6W7gmfnWg0PL8Uxrag7i+3+NoIroAQ==
X-Received by 2002:a1c:1bd7:: with SMTP id b206mr4785862wmb.85.1565276861628; Thu, 08 Aug 2019 08:07:41 -0700 (PDT)
Content-Disposition inline
In-Reply-To <20190808143848.GD1218@eeg.ccf.org>
User-Agent NeoMutt/20171215
X-detected-operating-system by eggs.gnu.org: Genre and OS details not recognized.
X-Received-From 2a00:1450:4864:20::332
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <20190808150739.tax42js5akbai6z6@chaz.gmail.com>
X-Mailman-Original-References <CABN8V7MFbLErHGDJTq0fsBJwS8nofcT8+jcd1LQf1QBq_GTPHQ@mail.gmail.com> <20190808143848.GD1218@eeg.ccf.org>
Xref csiph.com gnu.bash.bug:15314

Show key headers only | View raw


2019-08-08 10:38:48 -0400, Greg Wooledge:
[...]
> > shopt -s failglob
> > command="echo xyz\(\)"
> > $command
> > ```
> > 
> > And it was working fine. But somewhere between bash version 4 and 5 I
> > realized it generates an error:
> > no match: xyz\(\)
[...]
> And my personal response for this variant of the issue: stop putting
> shell commands in string variables and then trying to run them with
> unquoted parameter expansion.  See:
[...]

While I'd agree in this case, note that the austin-group thread
was mentionning a very similar case:
https://www.mail-archive.com/austin-group-l@opengroup.org/msg04213.html

That was in autoconf's configure script (including the one
shipped with bash) that is /broken/ by that change in 5.0:

as_echo='printf %s\n'
$as_echo x

now runs:

printf '%sn' x

if there's a file called %sn in the current directory and

printf '%s\n' x

otherwise

(and would cause an error with failglob and run printf x with
nullglob).

In that case, it's not because the autoconf authors don't know
any better but because at that point in the script where
$ac_echo is defined, they're trying to support ancient shells
that don't have function support.

-- 
Stephane

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Filename expansion bug Stephane Chazelas <stephane.chazelas@gmail.com> - 2019-08-08 16:07 +0100

csiph-web