bug-coreutils
[Top][All Lists]
Advanced

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

Limit the spew of error messages resulting from "wc /bin/sh"


From: James Youngman
Subject: Limit the spew of error messages resulting from "wc /bin/sh"
Date: Tue, 22 May 2007 02:21:53 +0100

2007-05-22  James Youngman  <address@hidden>

       * src/wc.c (wc): Limit the number of messages about invalid
       multibyte sequences to error_limit (currently 5).  If the actual
       number of conversion errors exceeds this, indicate the number of
       suppressed messages.  The idea is that most users typing "wc
       /bin/sh" actually know there are no words there and other users
       will be clued in by the error messages that remain (and the
       impressive count of suppressed messages).

Example:-

$ ./wc /bin/sh
./wc: /bin/sh:1: Invalid or incomplete multibyte or wide character
./wc: /bin/sh:2: Invalid or incomplete multibyte or wide character
./wc: /bin/sh:5: Invalid or incomplete multibyte or wide character
./wc: /bin/sh:6: Invalid or incomplete multibyte or wide character
./wc: /bin/sh:7: Invalid or incomplete multibyte or wide character
./wc: 226251 more multibyte conversion error messages were suppressed
 2409  21687 677184 /bin/sh


The patch itself appears as an attachment to avoid space/tab problems.

James.

Attachment: coreutils-wc-mb-err.patch
Description: Text Data


reply via email to

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