Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Field splitting with trailing non-whitespace IFS characters (fwd)



Anybody want to (or want me to) say anything more about this to the
austin-group list?


---------- Forwarded message ----------
Date: Mon, 7 Mar 2005 09:50:52 +0000
From: Geoff Clare <gwc@xxxxxxxxxxxxx>
To: austin-group-l@xxxxxxxxxxxxx
Subject: Re: Field splitting with trailing non-whitespace IFS characters
Resent-Date: 7 Mar 2005 09:51:17 -0000
Resent-From: austin-group-l@xxxxxxxxxxxxx
Resent-To: austin-group-l@xxxxxxxxxxxxx

Assuming there is consensus that Glenn's test script reflects the
intended POSIX requirements, I propose the following changes to
XCU6 to clarify the standard and to correct the defect identified
on the read page.

In 2.5.3 Shell Variables:

Delete "(Input Field Separators.) " from the beginning of the IFS
description.

On the sh page under ENVIRONMENT VARIABLES:

Delete "(Input Field Separators.) " from the beginning of the IFS
description.

Add to RATIONALE on the sh page:

"The name IFS was originally an abbreviation of Input Field Separators,
however this name is misleading as the IFS characters are actually
used as field terminators."

In 2.6.5 Field Splitting, paragraph 2:

Change "The shell shall treat each character of the IFS as a delimiter
and use the delimiters to split the results of parameter expansion and
command substitution into fields."

to "The shell shall treat each character of the IFS as a delimiter
and use the delimiters as field terminators to split the results of
parameter expansion and command substitution into fields."

On the read page:

Change "If there are fewer var operands specified than there are
fields, the leftover fields and their intervening separators shall be
assigned to the last var."

to "If there are fewer var operands specified than there are fields,
the last var shall be set to a value comprising the following elements:

    * the field that corresponds to the last var in the normal
      assignment sequence described above,
    * the delimiter(s) that follow the field corresponding to the
      last var, and
    * the remaining fields and their delimiters."


Any comments before I submit these as an aardvark?

-- 
Geoff Clare <g.clare@xxxxxxxxxxxxx>
The Open Group, Thames Tower, Station Road, Reading, RG1 1LX, England



Messages sorted by: Reverse Date, Date, Thread, Author