LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   o/p of wc (https://www.linuxquestions.org/questions/linux-newbie-8/o-p-of-wc-855657/)

lipun4u 01-11-2011 01:27 PM

o/p of wc
 
plz look into the following command...

Code:

asit@ubuntu:~/script$ echo 567 | wc -c
4


though 567 is a 3 character number, why the o/p is 4 ??

Tinkster 01-11-2011 01:44 PM

Because echo, invoked w/o a "-n", will append a linefeed.



Cheers,
Tink


All times are GMT -5. The time now is 03:41 AM.