History log of /freebsd-current/usr.bin/split/split.1
Revision Date Author Comments
# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# b2c76c41 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line nroff pattern

Remove /^\.\\"\s*\$FreeBSD\$$\n/


# ac17fc81 30-May-2023 Jan Schaumann <jschauma@netmeister.org>

split(1): add '-c' to continue creating files

Currently, split(1) will clobber any existing output files:

$ split file; ls
xaa xab xac xad
$ split second-file; ls
xaa xab xac xad xae xaf

This patch adds a flag "-c" (mnemonic "create, don't overwrite" or
"continue where you left off"):

$ split file; ls
xaa xab xac xad
$ split -c second-file; ls
xaa xab xac xad xae xaf xag xah xai xaj

Reviewed by: christos
Approved by: kevans
Different Revision: https://reviews.freebsd.org/D38553


# c4f7198f 30-May-2023 Jan Schaumann <jschauma@netmeister.org>

split(1): auto-extend suffix length if required

If the input cannot be split into the number of files resulting from the
default suffix length, automatically extend the suffix length rather
than bailing out with 'too many files'.

Suffixes are extended such that the resulting files continue to sort
lexically and "cat *" would reproduce the input. For example, splitting
a 1M lines file into (default) 1000 lines per file would yield files
named 'xaa', 'xab', ..., 'xyy', 'xyz', 'xzaaa', 'xzaab', ..., 'xzanl'.

If '-a' is specified, the suffix length is not auto-extended.

This behavior matches GNU sort(1) since around version 8.16.

Reviewed by: christos
Approved by: kevans
Different Revision: https://reviews.freebsd.org/D38279


# fb499259 14-Apr-2023 Mateusz Piotrowski <0mp@FreeBSD.org>

split: Update synopsis and usage; fix examples

- Mark -d as an optional flag
- Add a prompt to one of the examples for consistency
- Add -d to the usage message

Sponsored by: Klara Inc.


# 7aaa50c6 25-Oct-2022 Kyle Evans <kevans@FreeBSD.org>

split: add word order fix

This was meant to note that both pattern and line matching were
previously restricted, but words are difficult. +line and rearrange.

Sponsored by: Klara, Inc.


# 5c053aa3 22-Aug-2022 Kyle Evans <kevans@FreeBSD.org>

split: switch to getline() for line/pattern matching

Get rid of split's home-grown logic for growing the buffer; arbitrarily
breaking at LONG_MAX bytes instead of 65536 bytes gives us much more
wiggle room. Additionally, we'll actually fail out entirely if we can't
fit a line, which makes noticing this class of problem much easier.

Reviewed by: bapt, emaste, pauamma
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D36323


# e48cafb5 18-Jun-2020 Fernando ApesteguĂ­a <fernape@FreeBSD.org>

split(1): Add EXAMPLES section

Add EXAMPLES covering -d, -n and -p
Include small explanation about the size of the chunks for the -n option

Approved by: 0mp
Differential Revision: https://reviews.freebsd.org/D25198


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# a93b9b7d 09-May-2013 Eitan Adler <eadler@FreeBSD.org>

Bump .Dd for recent content change.

Reported by: delphij


# 7f418e34 09-May-2013 Eitan Adler <eadler@FreeBSD.org>

Implement 'split -d' which allows a numeric suffix instead of an
alphabetic one.

PR: bin/116209
Submitted by: Marcin Gryszkalis <mg@fork.pl> (adapted from)
Reviewed by: will
MFC after: 1 week


# da52b4ca 11-Dec-2010 Joel Dahl <joel@FreeBSD.org>

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# f806ea8a 02-Sep-2010 Gavin Atkinson <gavin@FreeBSD.org>

Correct spelling mistake, int -> into

MFC after: 3 days


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# cff548f0 23-Jan-2009 Tom Rhodes <trhodes@FreeBSD.org>

When "-b" is specified, one could easily create "smaller" files
that are much larger than expected (given the default size).
Change "smaller files" to "split files" which is more in line
with what "-b" actually does.

PR: 119329
Submitted by: Julian Stacey <jhs@berklix.org>


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 0e286f08 16-Mar-2008 David Schultz <das@FreeBSD.org>

Add a -n option to split(1) to split files into N chunks rather than
having to specify the right number of bytes.

Obtained from: NetBSD
Submitted by: Jan Schaumann <jschauma@netmeister.org>
PR: 113175


# cb29445a 29-Sep-2006 Ruslan Ermilov <ru@FreeBSD.org>

Markup fixes.


# a6dd1c93 10-Aug-2006 Giorgos Keramidas <keramida@FreeBSD.org>

Add support for splitting at gigabyte boundaries. [1]

Also make both lowercase and uppercase suffix letters work
as byte-count suffixes, i.e. the following two commands are
equivalent now:

% split -b 4m foo
% split -b 4M foo

Submitted by: Roman Divacky [1]
Lots of help by: cperciva
Reviewed by: cperciva
MFC after: 1 week


# 49198c42 08-Aug-2006 Giorgos Keramidas <keramida@FreeBSD.org>

Update usage & SYNOPSIS and clarify that input files are not removed.
Sort getopt option handling of -p too, while here.

The changes are adapted from a patch by Ruslan Ermilov, posted as
followup to docs/33852.

PR: docs/33852
Submitted by: Gary W. Swearingen <swear@blarg.net>
MFC after: 1 week


# 4e9e907d 18-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

-mdoc sweep.


# 33eafb83 29-Aug-2005 Tim J. Robbins <tjr@FreeBSD.org>

Include option-argument names in the list in the DESCRIPTION section.
Remove a non-bug from the BUGS section.


# e93586df 21-Aug-2005 Tim J. Robbins <tjr@FreeBSD.org>

Remove the hack that varied the first character of the output file name
if none was specified on the command line. This is not permitted by
POSIX, and no longer needed now that we have the -a option.

PR: 85099
Submitted by: Toby Peterson (Apple Computer)


# a866e170 17-Jan-2005 Ruslan Ermilov <ru@FreeBSD.org>

Added the EXIT STATUS section where appropriate.


# cd2890d7 11-Jul-2004 Tim J. Robbins <tjr@FreeBSD.org>

Fix document year.

Noticed by: simon


# 5c9fc899 11-Jul-2004 Tim J. Robbins <tjr@FreeBSD.org>

Add fairly standard ENVIRONMENT and DIAGNOSTICS sections.


# 242093bb 03-Jun-2002 Tim J. Robbins <tjr@FreeBSD.org>

Sort sections.


# 03c249af 03-Jun-2002 Tim J. Robbins <tjr@FreeBSD.org>

Correct HISTORY section - split(1) appeared at least as early as V3.


# f9988a58 30-May-2002 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: use .Fl to denote stdin.


# 3662a240 27-May-2002 Tim J. Robbins <tjr@FreeBSD.org>

Claim conformance to IEEE Std 1003.1-2001.
See also csplit(1).


# 3e4228c3 26-May-2002 Tim J. Robbins <tjr@FreeBSD.org>

Allow "-" to be specified as an operand as well as an option.
SUSV3 requires something like "split -- -" to work. Document the "-" operand.


# 41850495 31-Jan-2002 Mike Barcroft <mike@FreeBSD.org>

Add -a option (SUSv3) to split(1).

Submitted by: Tim J. Robbins <tim@robbins.dropbear.id.au>
MFC after: 1 month


# f247324d 15-Jul-2001 Dima Dorfman <dd@FreeBSD.org>

Remove whitespace at EOL.


# 8fe908ef 20-Nov-2000 Ruslan Ermilov <ru@FreeBSD.org>

mdoc(7) police: use the new features of the Nm macro.


# 76a06f84 15-Nov-2000 Ben Smithurst <ben@FreeBSD.org>

remove trailing periods from SEE ALSO.


# c3aac50f 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 2fa6610f 01-Feb-1999 Archie Cobbs <archie@FreeBSD.org>

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


# 9b50d902 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources