Re: IFS field splitting doesn't conform with POSIX
From:
Kerin Millar
Subject:
Re: IFS field splitting doesn't conform with POSIX
Date:
Thu, 30 Mar 2023 19:39:03 +0100
On Thu, 30 Mar 2023 11:52:06 -0600
Felipe Contreras <felipe.contreras@gmail.com> wrote:
> Chet wrote:
> > Alternately, you can think of the NUL at the end of the string as an
> > additional field terminator,
>
> Except if you do that, then 'a,' has two fields since the end of the
> string is an additional field terminator, as I explained.
>
> > but one that follows the adjacency rules and doesn't create any empty
> > fields.
>
> So it's a *very special* field terminator that is mentioned nowhere in
> the POSIX specification.
I can only suggest issuing a formal request for clarification. Clearly, there
exists a prevailing consenus across implementations (bash included). For the
matter not to be broached by the specification - at least, not by my reading -
seems irregular.
--
Kerin Millar