linux count lines of output linuc code example Example 1: shell count lines output $ somecommand | wc -l Example 2: lines count linux wc -l <filename>