

Wc off by one error - BritishGen
http://britishgeneralist.com/2015/04/03/wc-off-by-one-error/

======
_jomo
From `man wc`:

    
    
        A line is defined as a string of characters delimited by a <newline> character. Characters beyond the final <newline> character will not be included in the line count.
    

I first noticed this a few years ago when I tried to count results of some
command, for example:

    
    
        # echo foo | grep bar | wc -l
        0
        # wc -l <<<"$(echo foo | grep bar)"
        1
    

_(Yes I 'm aware of grep -c)_

