Re: your $(#…) bugreport
Chet Ramey <[email protected]> Tue, 3 Feb 2026 09:32:32 -0500
| Newsgroups | org.kernel.vger.dash |
|---|---|
| Message-ID | <[email protected]> |
On 2/3/26 4:00 AM, Jari Aalto wrote: >> [...] >> So, writing “`#comment`”, even if it works, is actually undefined, too. > > Ouch, too bad POSIX didn't define them to be exact equivalents. > From user's perspective, I wouöd have expected the statements to > exhibit the same behavior. To define them as identical would have been inconsistent with the historical behavior, and defeats the purpose of the standard. Bourne implemented `` the way he did, I presume, because it was easier and took less code (many Bourne shell implementation decisions come down to "is it shorter and faster?"). Korn chose different syntax so he could implement different semantics, without changing ``. POSIX standardized the historical behavior. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/