anonymous wrote: > URL: > <http://savannah.gnu.org/bugs/?24974> > > Hello, > > Could you explicitly document that "-1", "-2" and "-3" options > of "comm" can be combined. > This isn't obvious, and may lead some people [me!] to use > other tools instead.
It's common for options to be combined unless otherwise stated, but I take your point that it's perhaps a little confusing. Perhaps this change would make it more obvious? It's not removing info as the info removed is already presented on the previous line. diff --git a/src/comm.c b/src/comm.c index 4ec7e4a..6f250a9 100644 --- a/src/comm.c +++ b/src/comm.c @@ -113,9 +113,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 output of column 1\n\ + -2 suppress output of column 2\n\ + -3 suppress output of column 3\n\ "), stdout); fputs (_("\ \n\ I might add some examples to the docs also, along the lines of the following if I get a second. At least I should get the docs for `comm` and `join` to reference each other. # set operations on sorted files comm file1 file2 | sed 's/^\t*//' #Union comm -12 file1 file2 #Intersection comm -13 file1 file2 #Difference comm -3 file1 file2 | sed 's/^\t*//' #Symmetric Difference join -a1 -a2 file1 file2 #Union join file1 file2 #Intersection join -v2 file1 file2 #Difference join -v1 -v2 file1 file2 #Symmetric Difference # set operations on unsorted files sort file1 file2 | uniq #Union sort file1 file2 | uniq -d #Intersection sort file1 file1 file2 | uniq -u #Difference sort file1 file2 | uniq -u #Symmetric Difference cheers, Pádraig. p.s. Those new --check-order --nocheck-order options confuse me. When they were added I only took a quick look at the implementation rather than the interface (which Bo Borgerson kindly sped up for us). Perhaps something like this would be clearer: --check-order={none,mismatch,unsorted} By default --check-order=mismatch is enabled. I suppose it's too late to change now. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils