Word line and character count in UNIX shell command

by Francis 2014-03-15 14:45:55

Word line and character count in UNIX shell command

The wc command counts the number of lines, words, and characters in a file
wc /path/filename
wc -l /path/filename
Note : -l specify only the line number

You can save the output of wc (or any other command) with output redirection

wc /path/filename > wc.savefilename

You can specify the input with input redirection

wc < /path/filename

You can append lines to the end of an existing file with

wc -l /path/filename >>wc.savefilename

606
like
0
dislike
0
mail
flag

You must LOGIN to add comments