POSIX 7
Does word, line, character and other similar counts.
Mnemonic: Word Count.
[ "$(printf 'a\nb c\n'| wc)" = " 2 3 6" ] || exit 1
Meaning of output:
2: newline count3: word count6: byte count
Options:
c: bytes onlym: chars onlyl: newlines onlyL: max line length onlyw: words only
To omit the filename: use stdin! http://stackoverflow.com/questions/3746947/get-just-the-integer-from-wc-in-bash
wc <file