GNU bug report logs -
#20954
wc - linux
Previous Next
Reported by: tele <swojskichlopak <at> wp.pl>
Date: Thu, 2 Jul 2015 00:46:03 UTC
Severity: normal
Tags: notabug
Done: Bob Proulx <bob <at> proulx.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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
This bug report was last modified 9 years and 327 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.