Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: read broken in beta21
- X-seq: zsh-workers 1433
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: A.Main@xxxxxxxxxxxxxxxxx (Zefram)
- Subject: Re: read broken in beta21
- Date: Mon, 24 Jun 1996 19:38:10 +0200 (MET DST)
- Cc: A.Main@xxxxxxxxxxxxxxxxx, zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <8282.199606241720@xxxxxxxxxxxxxxxxxxxxxxx> from Zefram at "Jun 24, 96 06:20:36 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> >What is sh?
>
> I was referring to the Bourne shell.
>
> > The line shall be split into fields (see the definition in 3.1.3) as in
> > the shell (see 3.6.5); the first field shall be assigned to the first
> > variable var, the second field to the second variable var, etc. 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. If there are fewer fields than vars, the remaining vars shall be set
> > to empty strings.
>
> It sounds to me like trailing IFS characters are not *intervening*
> separators, and should therefore be removed.
non-whitespace IFS characters (NWICs) always separate fields. A trailing
NWIC separate a trailing empty field from the other fields. E.g.
% IFS=/ ; set -- $IFS ; echo $#
2
So the trailing NWICs are intervening separators between empty fields.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author