This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: wordexp IFS fixes


On 7 Sep 1998, Matthias Urlichs wrote:

> The shell is, however, free to ignore trailing $IFS characters (which makes
> a lot of sense if you assign the result of a command expansion to a
> variable or, worse, a shell array). This is, AFAIR, specified in the
> appropriate Posix document.

Really?  In 3.6.5 ("Field Splitting"):

"(3) [...]
    (a) IFS white space shall be ignored at the beginning and end of the
        input.
    (b) Each occurrence in the input of an IFS character that is not IFS
        white space, along with any adjacent IFS white space, shall
        delimit a field, as described previously.
    (c) Nonzero-length IFS white space shall delimit a field."

The way I read it, the shell is not free to ignore trailing IFS characters
unless they are white space.

Tim.
*/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]