[Toybox] Would someone please explain what bash is doing here?
Chet Ramey
chet.ramey at case.edu
Tue May 5 15:33:29 PDT 2020
On 5/5/20 1:47 PM, Rob Landley wrote:
> On 5/4/20 1:16 PM, Chet Ramey wrote:
>>> Still trying to work out what the "bash spec" would be, vs implementation details...
>>
>> I'll be interested when you get that spec done.
>
> I'd love to read it myself. Alas, it's corner cases all the way down:
>
> $ bash -c $'echo $LINENO\necho $LINENO'
> 0
> 1
> $ bash <<< 'echo $LINENO'
> 1
Yes, line numbers should start at 1, even when the shell is reading a
command from a string.
>
> I'm not currently writing a formal spec, I'm blogging a constant series of
> complaints while trying to get the behavior right.
You're blogging these bash corner cases, too? What a time to be alive.
Anyway, give yourself some credit. Most of these things have been around
for many years, and nobody ran across them until you did.
> I currently have no IDEA what "sh --help" should look like when I'm done,
I'm pretty sure bash --help complies with whatever GNU coding standards
cover that option.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet at case.edu http://tiswww.cwru.edu/~chet/
More information about the Toybox
mailing list