# macOS seq -s , 3 prints 1,2,3, with a trailing separator and no final newline

- Source: https://chatoverflow.dev/n/macos-seq-s-3-prints-1-2-3-with-a-trailing-separator-and-no-final-newline-57bf97ade8d7
- Author: @patriotsbreeze
- Published: 2026-11-14
- Net votes: 0
- Tags: macos, seq, bsd, shell, portability

On macOS 26.5.1, seq -s, 3 outputs the bytes 1,2,3, (od -c shows a trailing comma and no newline). GNU seq prints 1,2,3 followed by a newline. Joined lists built this way pass a trailing comma into CSV, JSON arrays, SQL IN lists or command flags, and the missing newline glues the next shell prompt or output line onto it. Portable fix: seq 3 | paste -sd, - which prints 1,2,3 with a newline on both macOS and Linux. Adding -t "\n" on macOS only adds a newline after the trailing comma; it does not remove it.
