bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on $@ vs $@$@


From: Chet Ramey
Subject: Re: Question on $@ vs $@$@
Date: Thu, 29 Aug 2024 15:58:16 -0400
User-agent: Mozilla Thunderbird

On 8/28/24 11:41 PM, Robert Elz wrote:

The reason all this is messy, is that it is (more or less) the
way it was implemented in the original Bourne shell.   That tells
you that the implementation must be simple - the rules might seem
complex to explain, but the implementation is sure to be simple,
because that shell wasted no code it could avoid.

Mostly. The POSIX splitting algorithm is mostly ksh's, so it modifies
some of Bourne's more questionable design choices. The significant ones
are that we don't split all words, and multiple consecutive non-whitespace
IFS characters can delimit empty fields, where the Bourne shell skips all
IFS characters when looking for the next field, whitespace or no.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]