Subject: Re: bug#20954: wc - linux

From: Bob Proulx <[email-masked]>
Date: Wed, 1 Jul 2015 19:41:00 -0600

tag 20954 + notabug
close 20954
thanks

tele wrote:
> Hi!

Hi! :-)

> From terminal:
> $ a="" ; echo $s | wc -l
> 1

Do you mean $a instead of $s?  Either way is the same though assuming
$s is empty too.

> Should be 0 , yes ?

No.  Should be 1.  You have forgotten about the newline at the end of
the command.  The echo will terminate with a newline.  You can see
this with od.

  echo | od -tx1 -c
  0000000  0a
           \n

Since this appears to be a usage error I have closed the bug.  Please
feel free to follow up with more information.  We will read it.  And
we appreciate additional communication!  I am simply closing it to
keep the accounting straight.  :-)

Bob