summaryrefslogtreecommitdiff
path: root/usr.bin/split/split.1
AgeCommit message (Collapse)Author
2023-11-26usr.bin: Remove ancient SCCS tags.Warner Losh
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
2023-08-16Remove $FreeBSD$: one-line nroff patternWarner Losh
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-05-30split(1): add '-c' to continue creating filesJan Schaumann
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
2023-05-30split(1): auto-extend suffix length if requiredJan Schaumann
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
2023-04-18split: Update synopsis and usage; fix examplesMateusz Piotrowski
- 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.
2022-10-25split: add word order fixKyle Evans
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.
2022-10-25split: switch to getline() for line/pattern matchingKyle Evans
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
2020-06-18split(1): Add EXAMPLES sectionFernando ApesteguĂ­a
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 Notes: svn path=/head/; revision=362328
2017-02-28Renumber copyright clause 4Warner Losh
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 Notes: svn path=/head/; revision=314436
2013-05-10Bump .Dd for recent content change.Eitan Adler
Reported by: delphij Notes: svn path=/head/; revision=250451
2013-05-10Implement 'split -d' which allows a numeric suffix instead of anEitan Adler
alphabetic one. PR: bin/116209 Submitted by: Marcin Gryszkalis <mg@fork.pl> (adapted from) Reviewed by: will MFC after: 1 week Notes: svn path=/head/; revision=250432
2010-12-11Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl
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 Notes: svn path=/head/; revision=216370
2010-09-02Correct spelling mistake, int -> intoGavin Atkinson
MFC after: 3 days Notes: svn path=/head/; revision=212162
2009-01-24When "-b" is specified, one could easily create "smaller" filesTom Rhodes
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> Notes: svn path=/head/; revision=187663
2008-03-16Add a -n option to split(1) to split files into N chunks rather thanDavid Schultz
having to specify the right number of bytes. Obtained from: NetBSD Submitted by: Jan Schaumann <jschauma@netmeister.org> PR: 113175 Notes: svn path=/head/; revision=177256
2006-09-29Markup fixes.Ruslan Ermilov
Notes: svn path=/head/; revision=162792
2006-08-10Add support for splitting at gigabyte boundaries. [1]Giorgos Keramidas
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 Notes: svn path=/head/; revision=161172
2006-08-08Update usage & SYNOPSIS and clarify that input files are not removed.Giorgos Keramidas
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 Notes: svn path=/head/; revision=161106
2005-11-18-mdoc sweep.Ruslan Ermilov
Notes: svn path=/head/; revision=152568
2005-08-30Include option-argument names in the list in the DESCRIPTION section.Tim J. Robbins
Remove a non-bug from the BUGS section. Notes: svn path=/head/; revision=149618
2005-08-21Remove the hack that varied the first character of the output file nameTim J. Robbins
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) Notes: svn path=/head/; revision=149345
2005-01-17Added the EXIT STATUS section where appropriate.Ruslan Ermilov
Notes: svn path=/head/; revision=140368
2004-07-11Fix document year.Tim J. Robbins
Noticed by: simon Notes: svn path=/head/; revision=131980
2004-07-11Add fairly standard ENVIRONMENT and DIAGNOSTICS sections.Tim J. Robbins
Notes: svn path=/head/; revision=131979
2002-06-03Sort sections.Tim J. Robbins
Notes: svn path=/head/; revision=97766
2002-06-03Correct HISTORY section - split(1) appeared at least as early as V3.Tim J. Robbins
Notes: svn path=/head/; revision=97765
2002-05-30mdoc(7) police: use .Fl to denote stdin.Ruslan Ermilov
Notes: svn path=/head/; revision=97545
2002-05-27Claim conformance to IEEE Std 1003.1-2001.Tim J. Robbins
See also csplit(1). Notes: svn path=/head/; revision=97336
2002-05-27Allow "-" to be specified as an operand as well as an option.Tim J. Robbins
SUSV3 requires something like "split -- -" to work. Document the "-" operand. Notes: svn path=/head/; revision=97334
2002-02-01Add -a option (SUSv3) to split(1).Mike Barcroft
Submitted by: Tim J. Robbins <tim@robbins.dropbear.id.au> MFC after: 1 month Notes: svn path=/head/; revision=90048
2001-07-15Remove whitespace at EOL.Dima Dorfman
Notes: svn path=/head/; revision=79755
2000-11-20mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov
Notes: svn path=/head/; revision=68963
2000-11-15remove trailing periods from SEE ALSO.Ben Smithurst
Notes: svn path=/head/; revision=68756
1999-08-28$Id$ -> $FreeBSD$Peter Wemm
Notes: svn path=/head/; revision=50477
1999-02-01Add new option '-p pattern' for splitting files based on matching lines inArchie Cobbs
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 Notes: svn path=/head/; revision=43513
1994-05-27BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590