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)
Mon, Sep 22, 8:39 PM
Unknown Object (File)
Sep 17 2025, 4:48 AM
Unknown Object (File)
Sep 16 2025, 7:16 PM
Unknown Object (File)
Aug 31 2025, 7:54 AM
Unknown Object (File)
Aug 26 2025, 11:32 PM
Unknown Object (File)
Aug 25 2025, 8:14 PM
Unknown Object (File)
Aug 19 2025, 3:15 AM
Unknown Object (File)
Aug 14 2025, 1:43 AM
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