Re: ksh: documented substitution behavior contradicts actual behavior

2022-10-17 Thread chohag
Kastus Shchuka writes: > On Sun, Oct 16, 2022 at 11:48:35AM +0100, cho...@jtan.com wrote: > > So given $X: > > > > $ X=' A : B::D' > > > > Parameter substitution: > > > > $ ( IFS=' :'; dump $X ) > > $VAR1 = 'A'; > > $VAR2 = 'B'; > > $VAR3 = ''; > > $VAR4 = 'D'; > > > >

Re: ksh: documented substitution behavior contradicts actual behavior

2022-10-16 Thread Kastus Shchuka
On Sun, Oct 16, 2022 at 11:48:35AM +0100, cho...@jtan.com wrote: > Kastus Shchuka writes: > > On Sat, Oct 15, 2022 at 11:42:17PM -0300, Lucas de Sena wrote: > > > Hi, > > > > > > After trying to split a string into fields delimited with colons and > > > spaces, I found this bug in how ksh(1) does

Re: ksh: documented substitution behavior contradicts actual behavior

2022-10-16 Thread chohag
Kastus Shchuka writes: > On Sat, Oct 15, 2022 at 11:42:17PM -0300, Lucas de Sena wrote: > > Hi, > > > > After trying to split a string into fields delimited with colons and > > spaces, I found this bug in how ksh(1) does substitution. The actual > > behavior contradicts what other shells like

Re: ksh: documented substitution behavior contradicts actual behavior

2022-10-16 Thread Kastus Shchuka
On Sat, Oct 15, 2022 at 11:42:17PM -0300, Lucas de Sena wrote: > Hi, > > After trying to split a string into fields delimited with colons and > spaces, I found this bug in how ksh(1) does substitution. The actual > behavior contradicts what other shells like bash and mksh do and also >

ksh: documented substitution behavior contradicts actual behavior

2022-10-15 Thread Lucas de Sena
Hi, After trying to split a string into fields delimited with colons and spaces, I found this bug in how ksh(1) does substitution. The actual behavior contradicts what other shells like bash and mksh do and also contradicts its own manual. Running the following on other shells (say, bash)