--- Begin Message ---
Subject: |
Linux command - wc |
Date: |
Thu, 7 Mar 2013 12:38:44 +0100 |
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.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#13897: Linux command - wc |
Date: |
Thu, 07 Mar 2013 09:54:22 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 |
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.
--- End Message ---