diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-02-04 03:53:49 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-02-04 03:53:49 +0000 |
commit | 986e4e95b9c5e0790b3a4a9918f01cb58fa5bd7b (patch) | |
tree | 52057a4fbc6e6aad43522533fec32553974cc7c4 /usr.bin/split/split.1 | |
parent | ba8a47c2925c4499697da08dee3a471390263ed0 (diff) |
From FreeBSD:
Add new option '-p pattern' for splitting files based on matching
lines in the file with a regular expression. Useful for e.g.
'cvs diff' output. Also compile cleanly with -Wall and use
defines from <sysexits.h>.
Diffstat (limited to 'usr.bin/split/split.1')
-rw-r--r-- | usr.bin/split/split.1 | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.bin/split/split.1 b/usr.bin/split/split.1 index 0e59fb11795..c2d0022974c 100644 --- a/usr.bin/split/split.1 +++ b/usr.bin/split/split.1 @@ -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 @@ 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 @@ -95,6 +106,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 |