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 :)
Thanks for the suggestion, but this already does what you want: calc `wc -m < file`/`wc -l < file` That is, POSIX requires that when reading from stdin rather than from a 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
signature.asc
Description: OpenPGP digital signature
