linux count number of lines in output code example Example: shell count lines output $ somecommand | wc -l