You can perform logical "or" operations on Microsoft Windows systems with the findstr command using the pipe character, i.e.,
|
, to separate the terms you wish to
search on. E.g., if I wanted to filter the output of the
netstat
command to search for any lines that contain either ":21", ":22", or ":990",
I could use the command below.
C:\>netstat -an | findstr ":21 | :22 | :990" TCP 0.0.0.0:21 0.0.0.0:0 LISTENING TCP 0.0.0.0:22 0.0.0.0:0 LISTENING TCP 0.0.0.0:990 0.0.0.0:0 LISTENING C:\>
References: