Page MenuHomeFreeBSD

seq(1): Put separator only between the elements.
ClosedPublic

Authored by pjd on Dec 19 2023, 2:46 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 9, 11:16 AM
Unknown Object (File)
Thu, May 9, 6:51 AM
Unknown Object (File)
Thu, May 9, 6:51 AM
Unknown Object (File)
Wed, May 8, 7:55 PM
Unknown Object (File)
Sat, Apr 27, 1:40 AM
Unknown Object (File)
Fri, Apr 26, 6:13 PM
Unknown Object (File)
Fri, Apr 26, 1:02 PM
Unknown Object (File)
Apr 19 2024, 6:48 PM
Subscribers

Details

Summary
  • Using non-default ('\n') separator will produce an output with the separator at the end of the output, eg.

% echo "[$(seq -s ' ' 0 2)]"
[0 1 2 ]

  • The output should always be followed by a new line character. Currently:

% seq -s ' ' 0 2
0 1 2 %

This change makes seq(1) to behave the same way Linux seq(1):

% echo "[$(seq -s ' ' 0 2)]"
[0 1 2]

% seq -s ' ' 0 2
0 1 2
%

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable