🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: org.kernel.vger.dash
1 messages
1 total messages Started by Harald van Dijk Fri, 21 Jun 2024 03:07
Re: Field splitting regression on master branch
#1
Author: Harald van Dijk
Date: Fri, 21 Jun 2024 03:07
19 lines
3935 bytes
On 21/06/2024 02:33, Martijn Dekker wrote:
> As of commit c0674f487c7aec2a3bdf6795cea7e60c9530c360, field splitting 
> is broken. Minimal-ish reproducer:
> 
> $ dash -c 'IFS=:; v=" :: :: "; set $v; echo $#'
> 5
> 
> Expected output: 2

This results in 5 in bash, ksh, older dash, yash, everything I can think 
to test. Whitespace IFS characters is meant to be handled differently 
from non-whitespace IFS characters, I think 5 is the correct result.

But with IFS=": " instead of IFS=:, the output was previously 4, is 
supposed to be 4, and has changed to 2; I agree that it looks like dash 
has introduced a bug here.

Cheers,
Harald van Dijk
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads