expand(1) on Solnix vs Linux and the BSDs

On a default Solnix system expand is the illumos expand at /usr/bin/expand, documented on one page together with unexpand. It takes only -t tablist, plus the old -tabstop and -tab1,tab2,... forms. It has no GNU long options and no -i (Linux's --initial).

What Solnix runs

A default Solnix system runs the illumos expand at /usr/bin/expand. No other variants are shipped. The Solnix page also documents unexpand, which has -a and -t. The Linux, FreeBSD, OpenBSD and NetBSD pages in the bundle cover both commands except Linux, whose page covers expand only.

Differences

Compared withTopicWhat differs
Linux-i / --initialLinux expand has -i (--initial), which stops conversion of tabs after non-blank characters. The Solnix expand page documents no such option, only -t and the dash forms.
Source: Linux expand(1) -i, --initial; Solnix expand(1) SYNOPSIS and OPTIONS
Linuxlong optionsLinux expand accepts --tabs=N, --initial, --help and --version. Solnix expand documents no long options, so scripts using --tabs= fail there.
Source: Linux expand(1) -t, --tabs, --help, --version; Solnix expand(1) SYNOPSIS
Linuxtab list syntaxLinux -t LIST accepts a '/' prefix on the last position (tab size after the last stop) and a '+' prefix (relative to the last stop). The Solnix page documents neither.
Source: Linux expand(1) -t, --tabs=LIST; Solnix expand(1) -t tablist
Linuxtab past the last stopOn Solnix, a tab past the last stop in a multi-stop list is replaced by one space. The Linux page says nothing about this case; it only offers the '/' and '+' prefixes for extending the list.
Source: Solnix expand(1) -t tablist; Linux expand(1) -t, --tabs=LIST
Linux, FreeBSD, NetBSD-tabstop and -tab1,tab2,... formsSolnix expand accepts the tab stops as a dash-prefixed argument without -t, such as -4 or -4,8,12. The Linux, FreeBSD and NetBSD pages document only -t.
Source: Solnix expand(1) SYNOPSIS, -tabstop, -tab1,tab2,...,tabn; Linux/FreeBSD/NetBSD expand(1) SYNOPSIS
OpenBSDdash form and repeated -tOpenBSD also accepts a dash-prefixed tablist without -t, as Solnix does. OpenBSD alone documents repeating -t to set stops at those columns. Solnix passes the list as one -t argument separated by blanks or commas.
Source: OpenBSD expand(1) -t tablist; Solnix expand(1) -t tablist
NetBSD-t synopsisThe NetBSD synopsis shows expand with -t tabstop or -t tab1,...,tabn. The DESCRIPTION text describes the tab-stop semantics but has no OPTIONS entry for -t. Solnix gives a full -t entry with the ascending-order rule.
Source: NetBSD expand(1) SYNOPSIS, DESCRIPTION; Solnix expand(1) -t tablist
OpenBSDunexpand -tSolnix unexpand supports -t tablist. OpenBSD unexpand does not: its synopsis is unexpand [-a], and its STANDARDS section says -t is not supported for unexpand.
Source: Solnix unexpand -t tablist; OpenBSD unexpand(1) SYNOPSIS, STANDARDS
FreeBSDunexpand -a with -tOn Solnix, giving -t makes unexpand ignore -a, and conversion is no longer limited to leading blanks. The FreeBSD synopsis shows -a and -t as alternatives, [-a | -t ...], and its page does not describe this interaction.
Source: Solnix unexpand(1) -t tablist; FreeBSD unexpand(1) SYNOPSIS, -a, -t
FreeBSD, OpenBSD, NetBSDunexpand -t availabilityThe NetBSD synopsis lists unexpand -t and the FreeBSD synopsis lists it as an alternative to -a. Behaviour of -t with -a is described only in the Solnix page.
Source: NetBSD unexpand(1) SYNOPSIS; FreeBSD unexpand(1) SYNOPSIS; Solnix unexpand(1) -t tablist
Linuxstandard input operandLinux documents that FILE of - reads standard input. The Solnix page says only that no file means standard input, and does not mention -.
Source: Linux expand(1) DESCRIPTION; Solnix expand(1) DESCRIPTION, OPERANDS
Linux, OpenBSD, NetBSDenvironment variablesSolnix lists LANG, LC_ALL, LC_CTYPE, LC_MESSAGES and NLSPATH. FreeBSD lists LANG, LC_ALL and LC_CTYPE. The Linux, OpenBSD and NetBSD pages in the bundle have no environment section.
Source: Solnix expand(1) ENVIRONMENT VARIABLES; FreeBSD expand(1) ENVIRONMENT

Standards

  • POSIX: expand is a POSIX.1-2024 utility.
  • Solnix: Interface Stability: Standard. CSI: enabled.
  • FreeBSD: expand and unexpand conform to IEEE Std 1003.1-2001 (“POSIX.1”).
  • OpenBSD: Compliant with IEEE Std 1003.1-2008 (“POSIX.1”), except that unexpand has no -t flag. Giving tab stops without -t is not specified by that standard, though it states it “may be present in some implementations”.

Writing portable scripts

  • Use expand -t N or expand -t a,b,c with a comma-separated list. Avoid -i, --tabs and the dash forms such as -4, which only some systems accept.
  • Do not use unexpand -t in scripts that must run on OpenBSD, and do not combine it with -a: Solnix ignores -a when -t is given.

Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.