summaryrefslogtreecommitdiffstats
path: root/usr.bin/split/split.1
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/split/split.1')
-rw-r--r--usr.bin/split/split.116
1 files changed, 16 insertions, 0 deletions
diff --git a/usr.bin/split/split.1 b/usr.bin/split/split.1
index 34f3c07..927250c 100644
--- a/usr.bin/split/split.1
+++ b/usr.bin/split/split.1
@@ -30,6 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)split.1 8.3 (Berkeley) 4/16/94
+.\" $Id$
.\"
.Dd April 16, 1994
.Dt SPLIT 1
@@ -41,6 +42,7 @@
.Nm split
.Op Fl b Ar byte_count[k|m]
.Op Fl l Ar line_count
+.Op Fl p Ar pattern
.Op Ar file Op Ar name
.Sh DESCRIPTION
The
@@ -70,6 +72,16 @@ megabyte pieces.
Create smaller files
.Ar n
lines in length.
+.It Fl p Ar pattern
+The file is split whenever an input line matches
+.Ar pattern ,
+which is interpreted as an extended regular expression.
+The matching line will be the first line of the next output file.
+This option is incompatible with the
+.Fl b
+and
+.Fl l
+options.
.El
.Pp
If additional arguments are specified, the first is used as the name
@@ -92,6 +104,10 @@ For historical reasons, if you specify
can only create 676 separate
files.
The default naming convention allows 2028 separate files.
+.Pp
+The maximum line length for matching patterns is 65536.
+.Sh SEE ALSO
+.Xr re_format 7 .
.Sh HISTORY
A
.Nm split
OpenPOWER on IntegriCloud