On Tue, Mar 30, 2021, at 4:50 PM, Greg Wooledge wrote: > On Wed, Mar 31, 2021 at 02:31:46AM +0700, by.sm--- via Bug reports for > the GNU Bourne Again SHell wrote: > > poc=whoami > > $poc > > python3 -c "print('!!')" > > > > That return 'whoami' command. > > You're running into the csh-style history expansion. A lot of us simply > disable it, because it's not worth the effort it takes to work around it. > > set +o histexpand > > > If you insist on keeping it, and working around it, the key is to > understand that single quotes will protect you, but double quotes may > not. > > echo 'hi!' > > echo "hi!"
Further reading: https://mywiki.wooledge.org/BashPitfalls#echo_.22Hello_World.21.22 vq