Can I grep only the first n lines of a file? November 20, 2022 by Tarik The magic of pipes; head -10 log.txt | grep <whatever>