summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2010-03-08 22:03:24 +0100
committerDenys Vlasenko2010-03-08 22:03:24 +0100
commit79950a6bbe080441fbffc450e1e75f103e968839 (patch)
treeb95c8c253982f4a099d155e31d8f2c1c173e5be1
parentc77e478af4587e75e9be20d4c4c73e354fe47943 (diff)
downloadbusybox-79950a6bbe080441fbffc450e1e75f103e968839.zip
busybox-79950a6bbe080441fbffc450e1e75f103e968839.tar.gz
wc: compat: make "wc -c ONE_FILE" not print leading spaces. +2 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/wc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/coreutils/wc.c b/coreutils/wc.c
index 08f3c2d..7116842 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -88,6 +88,8 @@ int wc_main(int argc UNUSED_PARAM, char **argv)
if (!argv[0]) {
*--argv = (char *) bb_msg_standard_input;
fname_fmt = "\n";
+ }
+ if (!argv[1]) { /* zero or one filename? */
if (!((print_type-1) & print_type)) /* exactly one option? */
start_fmt = "%"COUNT_FMT;
}