In July 2025, I discovered a subtle bug in Bash related to parameter expansion when combining a variable with a quoted string and a trailing $.
export S=" "
echo $S"hello"$ hello$
hello$
This unexpected space suggests a bug in how Bash parses or expands variables when combined with quoted strings and special symbols.
I reported this bug to the GNU Bash maintainers through Savannah. The official bug ID is:
The issue was confirmed and fixed in the development branch by Chet Ramey, the Bash maintainer.
Chet Ramey responded with two digitally signed messages confirming the bug and its fix.
You can find the original signature files here:
You can verify the signatures using GPG:
gpg --verify chet-response-1.asc
gpg --verify chet-response-2.asctest_case.shβ Minimal test case showing the bugreport.txtβ Full bug report as submittedlinks.mdβ References to Bash and bug tracker