code
macname@localhost Desktop % cat a.txt 1dededede 2dedefrfr 3frhvfvfvf 4frfrdede 5frfrfrfrf 6frfrede 7jukitttt 8csxssss 9zaxss 10swwww 11ssssss 12aaaaa macname@localhost Desktop % grep 2 a.txt |wc -l 2 macname@localhost Desktop % grep 3 a.txt 3frhvfvfvf macname@localhost Desktop % macname@localhost Desktop % grep 3 a.txt |wc -l 1 macname@localhost Desktop %