Pádraig Brady
ce2b875cd7
wc: add --total={auto,never,always,only} option
...
without this option, control of when the total is output
is quite awkward. Consider trying to suppress the total line,
which could be achieved with something like:
wc-no-total() { wc "$@" /dev/null | head -n-2; }
As well as being non obvious, it's also non general.
It would give a non failure, but zero count if passed a file on stdin.
Also it doesn't work in conjunction with the --files0-from option,
which would need to be handled differently with something like:
{ find files -print0; printf '%s\0' /dev/null; } |
wc --files0-from=- |
head -n2
Also getting just the total can be awkward as file names
are only suppressed when processing stdin, and
also a total line is only printed if processing more than one file.
For completness this might be achieved currently with:
wc-only-total() {
wc "$@" |
tail -n1 |
sed 's/^ *//; s/ [^ 0-9]*$//'
}
* src/wc.c: Add new --total option.
* tests/misc/wc-total.sh: New test suite for the new option.
* tests/local.mk: Reference the new test.
* doc/coreutils.texi (wc invocation): Document the new option.
* THANKS.in: Add suggestor.
* NEWS: Mention the new feature.
2022-09-26 15:04:56 +01:00
..
2022-01-02 16:15:55 +00:00
2022-04-11 15:47:16 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-30 23:13:52 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-08-27 18:41:10 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-07-24 20:40:34 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-03-05 11:23:38 -08:00
2022-02-15 17:01:19 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-04-13 00:36:25 +01:00
2022-09-18 11:42:02 -07:00
2022-04-13 00:36:25 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-05-09 14:38:01 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-08-27 19:18:29 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-06-03 19:45:47 -07:00
2022-08-13 13:48:24 +01:00
2022-04-12 13:30:50 +01:00
2022-04-12 13:30:50 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-04-13 00:36:25 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-04-11 15:46:57 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-08-27 22:15:44 +01:00
2022-08-27 17:50:20 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-09-18 11:42:02 -07:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-05-02 21:26:59 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-02-12 20:15:03 -08:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-04-13 00:36:25 +01:00
2022-08-31 01:03:33 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-04-13 00:36:25 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-08-27 19:18:29 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-02-24 13:58:06 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-09-26 15:04:56 +01:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00
2022-01-02 16:15:55 +00:00