On 1/11/11 3:36 PM, Greg Wooledge wrote:
> POSIX 2.6.5 Field Splitting [1] says, in part,
>
> 1. If IFS is <space><tab><newline> or unset, ...
> 2. If IFS is null, ...
> 3. Otherwise, ...
> 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.
>
> I'm attempting to understand what exactly "delimit a field" means.
The standard is consistent -- or tries to be -- in saying that delimit
a field means terminate a field. For instance, the current version of
the standard says, in 2.6.5:
"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"
A discussion nearly identical to this one took place in February/March
2005, and should be available in the austin-group mailing list archives.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/