Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Greg Wooledge 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: References: <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 Envelope-to: bug-bash@gnu.org Mail-Followup-To: Janek Mi , bug-bash@gnu.org, marcin.slusarz@gmail.com Content-Disposition: inline In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20190808143848.GD1218@eeg.ccf.org> X-Mailman-Original-References: Xref: csiph.com gnu.bash.bug:15313 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