Re: IFS field splitting doesn't conform with POSIX

2023-04-01 Thread Felipe Contreras
On Sat, Apr 1, 2023 at 6:35 PM Lawrence Velázquez wrote: > > On Sat, Apr 1, 2023, at 8:02 PM, Felipe Contreras wrote: > > In that example they are discussing whether or not to make that > > behavior a *requirement*. That is prescriptive. > > You're so busy preten

Re: IFS field splitting doesn't conform with POSIX

2023-04-01 Thread Felipe Contreras
On Thu, Mar 30, 2023 at 1:20 PM Lawrence Velázquez wrote: > On Thu, Mar 30, 2023, at 2:25 PM, Felipe Contreras wrote: > > The challenge is in deciding what they *should* do, which is not > > descriptive, but prescriptive. > > The Austin Group does not see its role as p

Re: IFS field splitting doesn't conform with POSIX

2023-03-30 Thread Felipe Contreras
On Thu, Mar 30, 2023 at 11:48 AM Oğuz İsmail Uysal wrote: > > On 3/30/23 7:51 PM, Felipe Contreras wrote: > > So? This is argumentum ad populum. The fact that most shells do X > > doesn't imply that POSIX says X. > POSIX documents existing practice. Your definiti

Re: IFS field splitting doesn't conform with POSIX

2023-03-30 Thread Felipe Contreras
On Thu, Mar 30, 2023 at 11:22 AM Kerin Millar wrote: > > On Thu, 30 Mar 2023 07:51:59 -0600 > Felipe Contreras wrote: > > > On Thu, Mar 30, 2023 at 5:23 AM Greg Wooledge wrote: > > > > > > On Thu, Mar 30, 2023 at 05:12:46AM -0600, Felipe Contreras wrote: &g

Re: IFS field splitting doesn't conform with POSIX

2023-03-30 Thread Felipe Contreras
On Thu, Mar 30, 2023 at 9:52 AM Emanuele Torre wrote: > > On Thu, Mar 30, 2023 at 07:51:59AM -0600, Felipe Contreras wrote: > > But you can't replicate 'a,b' that way, because b does not have a > > terminator. Obviously we'll want 'b' as a field, therefore one has to > >

Re: IFS field splitting doesn't conform with POSIX

2023-03-30 Thread Felipe Contreras
On Thu, Mar 30, 2023 at 10:10 AM Oğuz İsmail Uysal wrote: > > On 3/30/23 2:12 PM, Felipe Contreras wrote: > > IFS=, > > str='foo,bar,,roo,' > > printf '"%s"\n' $str > zsh is the only shell that generates an empty last field, no othe

Re: IFS field splitting doesn't conform with POSIX

2023-03-30 Thread Felipe Contreras
On Thu, Mar 30, 2023 at 5:23 AM Greg Wooledge wrote: > > On Thu, Mar 30, 2023 at 05:12:46AM -0600, Felipe Contreras wrote: > > IFS=, > > str='foo,bar,,roo,' > > printf '"%s"\n' $str > > > > There is a discrepancy between how this is

IFS field splitting doesn't conform with POSIX

2023-03-30 Thread Felipe Contreras
m: x86_64 Arch Linux * compiler: gcc 12.2.1 [1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05 -- Felipe Contreras

IFS field splitting doesn't conform with POSIX

2023-03-30 Thread Felipe Contreras
m: x86_64 Arch Linux * compiler: gcc 12.2.1 [1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05 -- Felipe Contreras