[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: say when comm separator disappears
From: |
Pádraig Brady |
Subject: |
Re: say when comm separator disappears |
Date: |
Fri, 15 May 2009 17:19:35 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
address@hidden wrote:
> In (info "(coreutils)comm invocation"), after:
>
> With no options, `comm' produces three-column output. Column one
> contains lines unique to FILE1, column two contains lines unique to
> FILE2, and column three contains lines common to both files. Columns
> are separated by a single TAB character.
>
> The options `-1', `-2', and `-3' suppress printing of the
> corresponding columns. Also see *note Common options::.
>
> Please add: If two of them are used, the separator is no longer needed
> and will not be printed.
Well if only one of them is used the corresponding separator also suppressed.
There was also confusion about these parameters in bug 24974.
So I'll try and kill 2 birds with the 1 stone with:
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index b96fdb2..1a3075f 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -4565,7 +4565,7 @@ Columns are separated by a single TAB character.
@opindex -2
@opindex -3
The options @option{-1}, @option{-2}, and @option{-3} suppress printing of
-the corresponding columns. Also see @ref{Common options}.
+the corresponding columns (and separators). Also see @ref{Common options}.
Unlike some other comparison utilities, @command{comm} has an exit
status that does not depend on the result of the comparison.
diff --git a/src/comm.c b/src/comm.c
index 3c5b09a..55f8288 100644
--- a/src/comm.c
+++ b/src/comm.c
@@ -114,9 +114,9 @@ and column three contains lines common to both files.\n\
"), stdout);
fputs (_("\
\n\
- -1 suppress lines unique to FILE1\n\
- -2 suppress lines unique to FILE2\n\
- -3 suppress lines that appear in both files\n\
+ -1 suppress column 1 (lines unique to FILE1)\n\
+ -2 suppress column 2 (lines unique to FILE2)\n\
+ -3 suppress column 3 (lines that appear in both files)\n\
"), stdout);
fputs (_("\
\n\
@@ -133,6 +133,13 @@ and column three contains lines common to both files.\n\
\n\
Note, comparisons honor the rules specified by `LC_COLLATE'.\n\
"), stdout);
+ printf (_("\
+\n\
+Examples:\n\
+ %s -12 file1 file2 Print lines present in both file1 and file2.\n\
+ %s -3 file1 file2 Print lines in file1 not in file2, and vice versa.\n\
+"),
+ program_name, program_name);
emit_bug_reporting_address ();
}
exit (status);