diff options
author | archie <archie@FreeBSD.org> | 1999-02-01 21:16:45 +0000 |
---|---|---|
committer | archie <archie@FreeBSD.org> | 1999-02-01 21:16:45 +0000 |
commit | c3eeb08622b7845ad94522593f93674233225bf1 (patch) | |
tree | f5450b7b0e8808e9e46918e4e10c34d245a34335 /usr.bin/split/split.1 | |
parent | a116fafdf6d8a5ed6064da8cadc31d375c502eab (diff) | |
download | FreeBSD-src-c3eeb08622b7845ad94522593f93674233225bf1.zip FreeBSD-src-c3eeb08622b7845ad94522593f93674233225bf1.tar.gz |
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 fix a few style bugs.
PR: bin/9405
Diffstat (limited to 'usr.bin/split/split.1')
-rw-r--r-- | usr.bin/split/split.1 | 16 |
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 |