# head -10 log.txt | grep <whatever>
Example for plesk mail log
# head -n 10 /usr/local/psa/var/log/maillog | grep @domain.com
Return 10 results
# grep -m 10 @domain.com /usr/local/psa/var/log/maillog
Linux, Windows, Software Tips, Articles and Hacks
# head -10 log.txt | grep <whatever>
Example for plesk mail log
# head -n 10 /usr/local/psa/var/log/maillog | grep @domain.com
Return 10 results
# grep -m 10 @domain.com /usr/local/psa/var/log/maillog