How to display the number of lines, words and characters in separate lines

command linewc

I want to display the number of lines, words and characters, in a file, in separate lines?
I don't know anymore than using wc filename for this.

Best Answer

You can use tr:

wc filename | tr ' ' '\n' 

, or if you just want the numbers:

wc filename | tr ' ' '\n' | head -3
Related Question