split: new -t option to select record separator
commit4c795d543908ea4715b3e0bd6c6cf908315936d8
authorAssaf Gordon <assafgordon@gmail.com>
Wed, 7 Jan 2015 23:30:28 +0000 (7 18:30 -0500)
committerPádraig Brady <P@draigBrady.com>
Mon, 19 Jan 2015 23:22:37 +0000 (19 23:22 +0000)
tree74e9d10d130ce903bf9053508a42f9cb3f48858a
parentc4c2a09cc804afb338efa5ccedffa269888c4685
split: new -t option to select record separator

* src/split.c (eolchar): A new variable to hold
the separator character (unibyte for now).
This is reference throughout rather than hardcoding '\n'.
(usage): Describe the new --separator option, and
mention records along with lines so there is no ambiguity
that all options treat lines and records equivalently.
(main): Have -t update eolchar, or default to '\n'.
* tests/split/record-sep.sh: New test case.
* tests/local.mk: Reference the new test.
* doc/coreutils.texi (split invocation): Document the new option.
Adjust --lines, --line-bytes, --number=[lr]/... to mention
they pertain to records if --separator is specified.
* NEWS: Mention the new feature.
NEWS
doc/coreutils.texi
src/split.c
tests/local.mk
tests/split/record-sep.sh [new file with mode: 0755]