I understand how to use grep in the simple form:
<command that spits out text> | grep "text to find"
I would like to be able to grep
multiple different bits of text all at once.
How do I do that? Is grep
the correct command to do this?
Example
I run arp-scan
and I get a list of devices and their mac addresses. I want to search for the presence of multiple unique mac address strings. If I only wanted 1 mac address, I would use grep
like this:
arp-scan --localnet --interface=<my interface> | grep "mac address"
I have heard of sed
, but I don't know if it fits my use case.