|
From: | Thomas Bohm |
Subject: | Re: Suppress filenames in wc output |
Date: | Tue, 11 Feb 2014 22:05:57 +0100 |
Thanks for the suggestion, but this already does what you want:On 02/11/2014 01:26 PM, Thomas Bohm wrote:
> Hey,
>
> By playing with a word list today I noticed I can't compute the number of
> average letters / word by simply doing a calc `wc -m file`/`wc -l file`
> because the filename is part of the output if wc is run on a file (on stdin
> it is suppressed). This is why I added a new flag -q so that a user can
> suppress that part of the output I will. I don't have high hopes of it
> getting accepted, but I said I try :)
That is, POSIX requires that when reading from stdin rather than from a
calc `wc -m < file`/`wc -l < file`
filename, then there will be no filename in the output of wc. As this
is already a standard way to suppress the output, I see no need to add a -q.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |