printf(1) on Solnix vs Linux and the BSDs

On Solnix, /usr/bin/printf is the illumos printf, a POSIX.1-2024 utility. Its escapes and %b differ from Linux coreutils and the BSDs: the Solnix page documents only \ddd octal (no \e, \x or \u), and it supports n$ positional arguments.

What Solnix runs

A default Solnix system runs the illumos /usr/bin/printf. The page also documents a ksh93 printf (shell built-in) with extra conversions %B, %H, %P, %q, %R, %T and %Z and a different %b escape list; it is a separate implementation from /usr/bin/printf. No other variants are shipped.

Differences

Compared withTopicWhat differs
Linux, OpenBSD, NetBSD\e and \x escapesThe Solnix /usr/bin/printf page lists \\, \a, \b, \f, \n, \r, \t, \v and \ddd octal only. Linux documents \e and \xHH, and OpenBSD and NetBSD document \e and \x. The Solnix page documents none of these in /usr/bin/printf.
Source: Solnix printf(1) OPERANDS format; Linux printf(1) DESCRIPTION; OpenBSD printf(1) escape list; NetBSD printf(1) escape list
Linux\u and \U Unicode escapesLinux printf documents \uHHHH and \UHHHHHHHH Unicode escapes. The Solnix /usr/bin/printf page documents no Unicode escapes.
Source: Linux printf(1) DESCRIPTION; Solnix printf(1) OPERANDS format
all fourn$ positional argumentsSolnix /usr/bin/printf allows n$ after % (and after * for width or precision) to pick the nth argument. If used in one conversion it must be used in all. The FreeBSD, OpenBSD, NetBSD and Linux pages shown do not document n$.
Source: Solnix printf(1) OPERANDS format (n$ bullet); Linux/FreeBSD/OpenBSD/NetBSD printf(1) DESCRIPTION
Linux%b octal escapesIn %b, Solnix reads octal as \0ddd with zero to three digits after the 0. Linux says octal escapes in %b should have a leading 0, like \0NNN. Both treat \c as stopping output.
Source: Solnix printf(1) OPERANDS format (b conversion); Linux printf(1) %b
all four%q only in ksh93 on SolnixLinux documents %q for shell-reusable output. On Solnix, %q is documented only for the ksh93 built-in, not for /usr/bin/printf, whose only extra conversion is %b. Scripts calling /usr/bin/printf with %q may fail.
Source: Solnix printf(1) ksh93 section (%q); Linux printf(1) %q
NetBSD-L option and %B, %CNetBSD printf takes -L for long double output and documents %B and %C. The Solnix synopsis has no options, and /usr/bin/printf lists only the b extra conversion.
Source: NetBSD printf(1) SYNOPSIS, -L, Format; Solnix printf(1) SYNOPSIS
Linux--help and --versionLinux coreutils printf accepts --help and --version. The Solnix synopsis is only 'printf format [argument]...' and documents no options.
Source: Linux printf(1) SYNOPSIS; Solnix printf(1) SYNOPSIS
all fourbad numeric argumentOn Solnix, an argument that cannot be fully converted produces a diagnostic on standard error and a non-zero exit status. Processing continues and the value accumulated so far is written. The other pages shown do not document this behaviour.
Source: Solnix printf(1) OPERANDS argument; Linux/FreeBSD/OpenBSD/NetBSD printf(1) DESCRIPTION
FreeBSD, OpenBSD, NetBSDunspecified format casesSolnix says results are unspecified if the format has no conversions but arguments are given, or if a % sequence is not a valid conversion. The BSD pages shown say extra arguments reuse the format and do not describe these cases.
Source: Solnix printf(1) OPERANDS format; FreeBSD/OpenBSD/NetBSD printf(1) DESCRIPTION
Linuxshell built-inLinux's page says your shell may have its own printf that supersedes the program. On Solnix the ksh93 page documents a built-in printf with different conversions from /usr/bin/printf.
Source: Linux printf(1) DESCRIPTION (last paragraph); Solnix printf(1) ksh93 section

Standards

  • POSIX: printf is a POSIX.1-2024 utility.

Writing portable scripts

  • Use only \n, \t, \\ and \ddd octal in the format string, and %s, %d, %b and %% as conversions. Avoid \e, \x, \u, %q and n$, which are not documented on every system.
  • Do not rely on a shell's built-in printf matching /usr/bin/printf: on Solnix the ksh93 built-in has extra conversions, so name the conversions you need and test with the shell your script runs under.

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.