bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wc documentation bug


From: Eric Blake
Subject: Re: Wc documentation bug
Date: Fri, 18 Aug 2006 06:15:55 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Gustafsson on 8/18/2006 3:17 AM:
> Wc --help is incorrect regarding to wich output is displayed in which column. 
> 
> It says "Print byte, word, and newline counts" but the output is in newline, 
> word, and bytes. 

Time for you to upgrade!  The fact that you mailed bug-textutils is
already a big hint, since that list is obsolete since textutils was merged
into coreutils several years ago.  Also, if you use the latest stable
version (not to mention that an unstable 6.0 is also available), you will
notice that this doc bug has already been fixed:

$ wc --version | head -n 1
wc (GNU coreutils) 5.97
$ wc --help | head -n 2
$ wc --help
Usage: wc [OPTION]... [FILE]...
Print newline, word, and byte counts for each FILE, and a total line if
$

> 
> Which column the char count is displayed is unclear.
> 
> The output columns are always the same, regardless of the order of the 
> command line parameters. This is unpractical if you want to run the output 
> through sort. 

No, just learn how to use sort.  For an example, here is a demonstration
of how to sort on number of words, instead of number of lines:

$ { echo 'a  b  c' | wc; echo 'a
b' | wc; } | sort -k2,2
      2       2       4
      1       3       8

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE5a9684KuGfSFAYARApZ3AJwP8CE+Z8UOwA+104ulPE88nRCxHwCgt97X
uPPS1YBVE1HhoskBTLMmznk=
=BL//
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]