[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Filename expansion bug
From: |
Janek Mi |
Subject: |
Filename expansion bug |
Date: |
Thu, 8 Aug 2019 16:33:16 +0200 |
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.
- Filename expansion bug,
Janek Mi <=