break(1) on Solnix vs Linux and the BSDs
On Solnix, break and continue are shell built-ins with no separate binary. The page documents sh, csh, ksh and ksh93 forms. The main difference from FreeBSD is that csh break takes no count, while sh, ksh and ksh93 accept break [n]. The FreeBSD break(1) page is only an index of built-ins and does not describe how break behaves.
The manual pages
- Solnix: break(1) from
pkgs.solnix.illumos-world-man· illumos.org - FreeBSD: break(1) 15.1-RELEASE
What Solnix runs
No separate binary is installed. The command on PATH is the built-in of whichever shell you run (sh, ksh, ksh93 or csh). The Solnix page has a separate section for each shell. No other variants are shipped.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD | what the page documents | The FreeBSD break(1) page is the builtin(1) index of csh(1) and sh(1) built-ins. It only says break exists in both shells and gives no syntax or loop semantics. The Solnix page documents break and continue per shell. Source: FreeBSD break(1) NAME, SYNOPSIS, Commands table (break, continue); Solnix break(1) SYNOPSIS, DESCRIPTION |
| FreeBSD | not a standalone utility | On Solnix, break is a shell built-in and not a separate binary. FreeBSD marks break and continue as not standalone and provided by csh and sh. You cannot run either through exec or env on either system, going by these two pages. Source: Solnix header (shell built-in, not a separate binary); FreeBSD break(1) Commands table (Standalone: No) |
| FreeBSD | csh break takes no count | In Solnix csh, break and continue have no n argument. For a multilevel break you write several break commands on one line, and the rest of the line still runs. The FreeBSD page does not describe csh break syntax. Source: Solnix break(1) SYNOPSIS (csh), DESCRIPTION (csh); FreeBSD break(1) Commands table |
| FreeBSD | break n in sh and ksh | Solnix sh, ksh and ksh93 accept break [n] and continue [n] to leave or resume the n-th enclosing loop. The FreeBSD page does not say whether its sh(1) accepts n. Source: Solnix break(1) SYNOPSIS (sh, ksh, ksh93), DESCRIPTION; FreeBSD break(1) SYNOPSIS |
| FreeBSD | n larger than the loop depth | Solnix ksh and ksh93 exit (or continue) the outermost enclosing loop when n exceeds the number of loops. The Solnix sh section does not say what happens. The FreeBSD page does not say either. Source: Solnix break(1) DESCRIPTION (ksh, ksh93); FreeBSD break(1) DESCRIPTION |
| FreeBSD | which loops are covered | Solnix sh text names for and while loops. ksh and ksh93 add until and select. csh names foreach and while. The FreeBSD page does not say which loops break applies to, and its table has no select keyword. Source: Solnix break(1) DESCRIPTION (sh, ksh, ksh93, csh); FreeBSD break(1) Commands table |
| FreeBSD | special built-in behaviour in ksh | In Solnix ksh and ksh93, break and continue are special built-ins. Preceding variable assignments persist, and an error aborts the script. The FreeBSD page does not describe such behaviour for its shells. Source: Solnix break(1) DESCRIPTION (ksh, ksh93, numbered list on * and + commands); FreeBSD break(1) DESCRIPTION |
Standards
- POSIX: The bundle header says break is not a POSIX.1-2024 utility.
Writing portable scripts
- Do not give break or continue a count in csh scripts. The Solnix csh form takes no argument.
- Do not rely on a count larger than the number of enclosing loops. Only the Solnix ksh and ksh93 sections document what happens in that case.
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.