---
name: "plan9-split"
section: "1"
platform: "linux"
package: "9base"
version: "1:6-5"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/plan9-split"
---

# plan9-split(1)

split a file into pieces

## NAME

split - split a file into pieces

## SYNOPSIS

**split** \[ *option ...* \] \[ *file* \]

## DESCRIPTION

*Split* reads *file* (standard input by default) and writes it in pieces of 1000 lines per output file. The names of the output files are **xaa**, **xab**, and so on to **xzz**. The options are

- **-n** *n*

  Split into *n*-line pieces.

- **-l** *n*

  Synonym for **-n** *n*, a nod to Unix's syntax.

- **-e** *expression*

  File divisions occur at each line that matches a regular *expression*; see  [*regexp*(7)](/regexp/7.md). Multiple **-e** options may appear. If a subexpression of *expression* is contained in parentheses **(**...**)**, the output file name is the portion of the line which matches the subexpression.

- **-f** *stem*

  Use *stem* instead of **x** in output file names.

- **-s** *suffix*

  Append *suffix* to names identified under **-e**.

- **-x**

  Exclude the matched input line from the output file.

- **-i**

  Ignore case in option **-e**; force output file names (excluding the suffix) to lower case.

## SOURCE

**/src/cmd/split.c**

## SEE ALSO

[*sed*(1)](/sed/1.md), [*awk*(1)](/awk/1.md), [*grep*(1)](/grep/1.md), [*regexp*(7)](/regexp/7.md)
