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


Groups > gnu.bash.bug > #15311

Filename expansion bug

From Janek Mi <janekmi@gmail.com>
Newsgroups gnu.bash.bug
Subject Filename expansion bug
Date 2019-08-08 16:33 +0200
Message-ID <mailman.1065.1565274812.1985.bug-bash@gnu.org> (permalink)
References <CABN8V7MFbLErHGDJTq0fsBJwS8nofcT8+jcd1LQf1QBq_GTPHQ@mail.gmail.com>

Show all headers | View raw


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.

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


Thread

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

csiph-web