加入 -c 參數即可顯示行數
-c
cat * | grep -c
參考資料
grep -r "[STRING TO SEARCH FOR]" "[DIRECTORY TO SEARCH]"
grep -r "search text" "/tmp/search/folder"