Skip to content

mohos26/bash_bug_parameter_expansion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐞 Bash Bug: Extra Space in Parameter Expansion

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 $.

πŸ’‘ The Bug

export S=" "
echo $S"hello"$

πŸ”΄ Actual Output:

 hello$

βœ… Expected Output:

hello$

This unexpected space suggests a bug in how Bash parses or expands variables when combined with quoted strings and special symbols.


🧾 Report

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.


πŸ” Verified Developer Response (PGP Signed)

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.asc

πŸ“‚ Files

  • test_case.sh – Minimal test case showing the bug
  • report.txt – Full bug report as submitted
  • links.md – References to Bash and bug tracker

About

Bash Bug

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages