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)
Sep 15 2024, 4:29 AM
Unknown Object (File)
Sep 7 2024, 5:40 PM
Unknown Object (File)
Sep 4 2024, 9:36 PM
Unknown Object (File)
Aug 26 2024, 10:34 PM
Unknown Object (File)
May 9 2024, 11:16 AM
Unknown Object (File)
May 9 2024, 6:51 AM
Unknown Object (File)
May 9 2024, 6:51 AM
Unknown Object (File)
May 8 2024, 7:55 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