Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -O2 -flto=auto -ffat-lto-objects -fexceptions -g
-grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2
-mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection
-fcf-protection
uname output: Linux secondline.qa.ask4.net 5.14.0-427.42.1.el9_4.x86_64 #1
SMP PREEMPT_DYNAMIC Thu Oct 31 14:01:51 UTC 2024 x86_64 x86_64 x86_64
GNU/Linux
Machine Type: x86_64-redhat-linux-gnu
Bash Version: 5.1
Patch Level: 8
Release Status: release
Description:
The sequence !() seems to generate a list of files in the current
directory, possibly leading to unintended execution
I appreciate there should be a space, but the behaviour without one is
unexpected
Repeat-By:
[## Production ## ayoung@secondline ~]$ ls
Downloads granted.gw granted.mik lock1.sh lock2.sh pcaps scan.lock
[## Production ## ayoung@secondline ~]$ echo !()
Downloads granted.gw granted.mik lock1.sh lock2.sh pcaps scan.lock
[## Production ## ayoung@secondline ~]$ if !(test 1 = 2); then echo x; fi
-bash: Downloads: command not found
[## Production ## ayoung@secondline ~]$ if ! (test 1 = 2); then echo x; fi
x
[## Production ## ayoung@secondline test]$ echo "" > arp
[## Production ## ayoung@secondline test]$ ls
arp
[## Production ## ayoung@secondline test]$ if !(test 1 = 2); then echo x; fi
Address HWtype HWaddress Flags Mask
Iface
(snip)