count number of lines in terminal output September 26, 2022 by Tarik Pipe the result to wc using the -l (line count) switch: grep -Rl "curl" ./ | wc -l