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


Groups > gnu.bash.bug > #15313

Re: Filename expansion bug

Path csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: Filename expansion bug
Date Thu, 8 Aug 2019 10:38:48 -0400
Lines 25
Approved bug-bash@gnu.org
Message-ID <mailman.1067.1565275160.1985.bug-bash@gnu.org> (permalink)
References <CABN8V7MFbLErHGDJTq0fsBJwS8nofcT8+jcd1LQf1QBq_GTPHQ@mail.gmail.com> <20190808143848.GD1218@eeg.ccf.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1565275160 28546 209.51.188.17 (8 Aug 2019 14:39:20 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org, marcin.slusarz@gmail.com
To Janek Mi <janekmi@gmail.com>
Envelope-to bug-bash@gnu.org
Mail-Followup-To Janek Mi <janekmi@gmail.com>, bug-bash@gnu.org, marcin.slusarz@gmail.com
Content-Disposition inline
In-Reply-To <CABN8V7MFbLErHGDJTq0fsBJwS8nofcT8+jcd1LQf1QBq_GTPHQ@mail.gmail.com>
User-Agent Mutt/1.10.1 (2018-07-13)
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From 139.137.100.1
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 <20190808143848.GD1218@eeg.ccf.org>
X-Mailman-Original-References <CABN8V7MFbLErHGDJTq0fsBJwS8nofcT8+jcd1LQf1QBq_GTPHQ@mail.gmail.com>
Xref csiph.com gnu.bash.bug:15313

Show key headers only | View raw


On Thu, Aug 08, 2019 at 04:33:16PM +0200, Janek Mi wrote:
> For some time in my scripts I was using something like this:
> 
> ```shell
> #!/usr/bin/env bash
> 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\(\)

This looks just like another recent thread.  See Chet's response here:

https://lists.gnu.org/archive/html/bug-bash/2019-08/msg00015.html


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:

https://mywiki.wooledge.org/BashFAQ/050

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


Thread

Re: Filename expansion bug Greg Wooledge <wooledg@eeg.ccf.org> - 2019-08-08 10:38 -0400

csiph-web