bug-bash
[Top][All Lists]
Advanced

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

Re: <<IFS=: foo=a:b:; cmd $foo>> documented


From: Stephane CHAZELAS
Subject: Re: <<IFS=: foo=a:b:; cmd $foo>> documented
Date: Wed, 13 Oct 2004 08:19:27 +0100
User-agent: Mutt/1.5.6i

On Tue, Oct 12, 2004 at 09:37:50AM -0400, Chet Ramey wrote:
[...]
> In bash, and POSIX.2, and the other listed shells, trailing IFS characters
> never result in a separate field.
> 
> They're field delimiters, so they're treated as field terminators, which is
> not necessarily the same as field separators.  A trailing IFS character
> delimits the final field.
[...]

Hi Chet,

Yes, I understand that. My point was that it is not clearly
documented. And one would expect the zsh/pdksh/awk/perl
-na/cut -f/execvp behavior as it is called an "internal field
*separator*". The beginning and end of the string can also be
seen as natural delimiters.

I could not find in the SUSv3 where it is specified that a
trailing IFS non-white character should be discarded (or seen as
the end of the last field and not the beginning of an empty
other one terminated by the end of the string).
Or is it in the unsaid definition of "delimiter"?

regards,
Stephane




reply via email to

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