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


Groups > gnu.bash.bug > #15311 > unrolled thread

Filename expansion bug

Started byJanek Mi <janekmi@gmail.com>
First post2019-08-08 16:33 +0200
Last post2019-08-08 16:33 +0200
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Filename expansion bug Janek Mi <janekmi@gmail.com> - 2019-08-08 16:33 +0200

#15311 — Filename expansion bug

FromJanek Mi <janekmi@gmail.com>
Date2019-08-08 16:33 +0200
SubjectFilename expansion bug
Message-ID<mailman.1065.1565274812.1985.bug-bash@gnu.org>
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\(\)

with exit code equal 1.

If I understand correctly \( character should not trigger filename
expansion.
Any ideas?

Appendix:
```eval '$command'``` is causing the same issue whereas ```eval
"$command"``` works the same as bash 4 without filename expansion. Changing
the quotation mark character makes a huge difference.

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web