summaryrefslogtreecommitdiff
path: root/doc/coreutils.texi
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2016-01-12 16:29:32 +0000
committerPádraig Brady <P@draigBrady.com>2016-01-13 10:59:18 +0000
commitb2eadd109c3a508011705761dfe24a35180d925d (patch)
tree7efae6e5d2ba65a74b2e22e1160f0dd6a4013ce6 /doc/coreutils.texi
parentd44ae88199ebf44fe721c06621a7ffc442fa34be (diff)
downloadcoreutils-b2eadd109c3a508011705761dfe24a35180d925d.tar.xz
join,sort,uniq: with -z, treat '\n' as a field separator
* NEWS: Mention the change in behavior. * doc/coreutils.texi (newlineFieldSeparator): A new description, referenced from ({join,sort,uniq} invocation). * src/system.h (field_sep): A new inline function to determine if a character is a field separator. * src/join.c (usage): s/whitespace/blank/ to be more accurate wrt which characters are field separators. (xfields): s/isblank/field_sep/. * src/sort.c (inittables): Likewise. * src/uniq.c (find_field): Likewise. * tests/misc/join.pl: Adjust -z test, and add a test/example for processing the whole record with field processing. * tests/misc/sort.pl: Add -z test cases, including case with '\n'. * tests/misc/uniq.pl: Add -z -f test case with \n.
Diffstat (limited to 'doc/coreutils.texi')
-rw-r--r--doc/coreutils.texi5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 25380628d..80e9a032d 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -4493,6 +4493,9 @@ numeric string when checking for uniqueness, whereas @code{sort -n |
uniq} inspects the entire line. @xref{uniq invocation}.
@optZeroTerminated
+@macro newlineFieldSeparator
+Note with @option{-z} the newline character is treated as a field separator.
+@end macro
@end table
@@ -5034,6 +5037,7 @@ fields and characters). By default the entire rest of the lines are
compared.
@optZeroTerminated
+@newlineFieldSeparator
@end table
@@ -6157,6 +6161,7 @@ Print a line for each unpairable line in file @var{file-number}
(either @samp{1} or @samp{2}), instead of the normal output.
@optZeroTerminated
+@newlineFieldSeparator
@end table