Logical OR

"Lars Noodén [email protected] [sed-users]" <[email protected]> Sat, 7 Jan 2017 10:45:58 +0200
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
How do I refine the following so that the p cannot be triggered twice
even if both conditions are met in the same line?

	netstat -ntlp | sed -n -e '1,2p;/sshd/p'

Or is there a more efficient formula which can be used?

I'm aiming for the sed equivalent of an awk statement:

	netstat -ntlp | awk '/sshd/ || NR<=2'

Regards,
Lars