=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/split/split.1,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/split/split.1 1996/06/26 05:39:28 1.2 +++ src/usr.bin/split/split.1 1999/02/04 03:53:48 1.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: split.1,v 1.2 1996/06/26 05:39:28 deraadt Exp $ +.\" $OpenBSD: split.1,v 1.3 1999/02/04 03:53:48 millert Exp $ .\" $NetBSD: split.1,v 1.5 1994/12/21 08:20:35 jtc Exp $ .\" .\" Copyright (c) 1990, 1991, 1993, 1994 @@ -44,6 +44,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 @@ -73,6 +74,16 @@ 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 @@ -95,6 +106,10 @@ 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