GNU bug report logs - #13897
Linux command - wc

Previous Next

Package: coreutils;

Reported by: Francisco José Tena <tarod.net <at> gmail.com>

Date: Thu, 7 Mar 2013 16:56:01 UTC

Severity: normal

Tags: notabug

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13897 in the body.
You can then email your comments to 13897 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#13897; Package coreutils. (Thu, 07 Mar 2013 16:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Francisco José Tena <tarod.net <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 07 Mar 2013 16:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Francisco José Tena <tarod.net <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Linux command - wc
Date: Thu, 7 Mar 2013 12:38:44 +0100
[Message part 1 (text/plain, inline)]
Hello,

Using wc command in Linux, we're getting an unexpected behaviour.

The next command is returning 5 chars:

$ echo "TEST" | wc -m

The same behaviour is returned using the following command:

$ echo "TEST" | wc -c

Put the text in a file doesn't change the result.

If we type,

$ echo "TEST" | wc -L
the result is 4.

What the hell is happening?

Thanks,

Francisco Tena.
[Message part 2 (text/html, inline)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Thu, 07 Mar 2013 17:56:02 GMT) Full text and rfc822 format available.

Notification sent to Francisco José Tena <tarod.net <at> gmail.com>:
bug acknowledged by developer. (Thu, 07 Mar 2013 17:56:02 GMT) Full text and rfc822 format available.

Message #10 received at 13897-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Francisco José Tena <tarod.net <at> gmail.com>
Cc: 13897-done <at> debbugs.gnu.org
Subject: Re: bug#13897: Linux command - wc
Date: Thu, 07 Mar 2013 09:54:22 -0800
On 03/07/13 03:38, Francisco José Tena wrote:
> The next command is returning 5 chars:
> 
> $ echo "TEST" | wc -m

Tha's correct, since the 'echo' is outputting 5 characters:
T, E, S, T, and newline.




Information forwarded to bug-coreutils <at> gnu.org:
bug#13897; Package coreutils. (Thu, 07 Mar 2013 18:44:02 GMT) Full text and rfc822 format available.

Message #13 received at 13897 <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: 13897 <at> debbugs.gnu.org, tarod.net <at> gmail.com
Subject: Re: bug#13897: Linux command - wc
Date: Thu, 7 Mar 2013 11:42:39 -0700
Paul Eggert wrote:
> On 03/07/13 03:38, Francisco José Tena wrote:
> > The next command is returning 5 chars:
> > 
> > $ echo "TEST" | wc -m
> 
> Tha's correct, since the 'echo' is outputting 5 characters:
> T, E, S, T, and newline.

See also the output from od.

  $ echo "TEST" | od -tx1 -c
  0000000  54  45  53  54  0a
            T   E   S   T  \n

Bob




Information forwarded to bug-coreutils <at> gnu.org:
bug#13897; Package coreutils. (Thu, 07 Mar 2013 19:39:02 GMT) Full text and rfc822 format available.

Message #16 received at 13897 <at> debbugs.gnu.org (full text, mbox):

From: Francisco José Tena <tarod.net <at> gmail.com>
To: Bob Proulx <bob <at> proulx.com>
Cc: 13897 <at> debbugs.gnu.org
Subject: Re: bug#13897: Linux command - wc
Date: Thu, 7 Mar 2013 20:17:55 +0100
[Message part 1 (text/plain, inline)]
Thank you very much.


On Thu, Mar 7, 2013 at 7:42 PM, Bob Proulx <bob <at> proulx.com> wrote:

> Paul Eggert wrote:
> > On 03/07/13 03:38, Francisco José Tena wrote:
> > > The next command is returning 5 chars:
> > >
> > > $ echo "TEST" | wc -m
> >
> > Tha's correct, since the 'echo' is outputting 5 characters:
> > T, E, S, T, and newline.
>
> See also the output from od.
>
>   $ echo "TEST" | od -tx1 -c
>   0000000  54  45  53  54  0a
>             T   E   S   T  \n
>
> Bob
>
[Message part 2 (text/html, inline)]

Added tag(s) notabug. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Thu, 07 Mar 2013 23:08:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 05 Apr 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 134 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.