aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/split/split.1
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* split(1): add '-c' to continue creating filesJan Schaumann2023-05-301-4/+16
| | | | | | | | | | | | | | | | | | | | | 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
* split(1): auto-extend suffix length if requiredJan Schaumann2023-05-301-2/+6
| | | | | | | | | | | | | | | | | | | 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
* split: Update synopsis and usage; fix examplesMateusz Piotrowski2023-04-181-6/+6
| | | | | | | | - 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.
* split: add word order fixKyle Evans2022-10-251-1/+1
| | | | | | | 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.
* split: switch to getline() for line/pattern matchingKyle Evans2022-10-251-3/+5
| | | | | | | | | | | 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
* split(1): Add EXAMPLES sectionFernando ApesteguĂ­a2020-06-181-0/+36
| | | | | | | | | | | 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
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | 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
* Bump .Dd for recent content change.Eitan Adler2013-05-101-1/+1
| | | | | | | Reported by: delphij Notes: svn path=/head/; revision=250451
* Implement 'split -d' which allows a numeric suffix instead of anEitan Adler2013-05-101-0/+6
| | | | | | | | | | | | 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
* Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl2010-12-111-4/+0
| | | | | | | | | | | | 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
* Correct spelling mistake, int -> intoGavin Atkinson2010-09-021-2/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=212162
* When "-b" is specified, one could easily create "smaller" filesTom Rhodes2009-01-241-3/+3
| | | | | | | | | | | | 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
* Add a -n option to split(1) to split files into N chunks rather thanDavid Schultz2008-03-161-1/+9
| | | | | | | | | | | 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
* Markup fixes.Ruslan Ermilov2006-09-291-3/+9
| | | | Notes: svn path=/head/; revision=162792
* Add support for splitting at gigabyte boundaries. [1]Giorgos Keramidas2006-08-101-3/+14
| | | | | | | | | | | | | | | | | 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
* Update usage & SYNOPSIS and clarify that input files are not removed.Giorgos Keramidas2006-08-081-10/+22
| | | | | | | | | | | | | | 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
* -mdoc sweep.Ruslan Ermilov2005-11-181-4/+4
| | | | Notes: svn path=/head/; revision=152568
* Include option-argument names in the list in the DESCRIPTION section.Tim J. Robbins2005-08-301-12/+4
| | | | | | | Remove a non-bug from the BUGS section. Notes: svn path=/head/; revision=149618
* Remove the hack that varied the first character of the output file nameTim J. Robbins2005-08-211-5/+3
| | | | | | | | | | | 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
* Added the EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-171-1/+1
| | | | Notes: svn path=/head/; revision=140368
* Fix document year.Tim J. Robbins2004-07-111-1/+1
| | | | | | | Noticed by: simon Notes: svn path=/head/; revision=131980
* Add fairly standard ENVIRONMENT and DIAGNOSTICS sections.Tim J. Robbins2004-07-111-1/+12
| | | | Notes: svn path=/head/; revision=131979
* Sort sections.Tim J. Robbins2002-06-031-12/+12
| | | | Notes: svn path=/head/; revision=97766
* Correct HISTORY section - split(1) appeared at least as early as V3.Tim J. Robbins2002-06-031-1/+1
| | | | Notes: svn path=/head/; revision=97765
* mdoc(7) police: use .Fl to denote stdin.Ruslan Ermilov2002-05-301-1/+1
| | | | Notes: svn path=/head/; revision=97545
* Claim conformance to IEEE Std 1003.1-2001.Tim J. Robbins2002-05-271-0/+6
| | | | | | | See also csplit(1). Notes: svn path=/head/; revision=97336
* Allow "-" to be specified as an operand as well as an option.Tim J. Robbins2002-05-271-1/+7
| | | | | | | SUSV3 requires something like "split -- -" to work. Document the "-" operand. Notes: svn path=/head/; revision=97334
* Add -a option (SUSv3) to split(1).Mike Barcroft2002-02-011-4/+18
| | | | | | | | Submitted by: Tim J. Robbins <tim@robbins.dropbear.id.au> MFC after: 1 month Notes: svn path=/head/; revision=90048
* Remove whitespace at EOL.Dima Dorfman2001-07-151-1/+1
| | | | Notes: svn path=/head/; revision=79755
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-4/+4
| | | | Notes: svn path=/head/; revision=68963
* remove trailing periods from SEE ALSO.Ben Smithurst2000-11-151-1/+1
| | | | Notes: svn path=/head/; revision=68756
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Add new option '-p pattern' for splitting files based on matching lines inArchie Cobbs1999-02-011-0/+16
| | | | | | | | | 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
* BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes1994-05-271-0/+99
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590