Results 1 to 2 of 2
I am searching the output of a scanned wifi device and wish to select a couple of pieces of information from different lines. I'm trying to locate the Signal Strength, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-02-2013 #1
grep - multiple compare strings on a single invocation?
I'm trying to locate the Signal Strength, which has a "Quality" indication on the same line. And the SSID on a different line. The following is the pair of output lines
Quality=44/70 Signal level=-66 dBm
#iwlist wlan0 scan | grep -ivF SSID\0x0aQuality
Reading the man pages states something like the -F lets you search for multiple strings separated by a new-line character. I've even tried putting it in a script file and actually putting a new-line there which also did not work as the interpreter thought it was another command.
If anyone has any thoughts about this please advise. Maybe I can't do this like I'm thinking?
- 03-02-2013 #2
- Join Date
- Jan 2005
- Saint Paul, MN
Have you tried:
iwlist wlan0 | grep -E 'Quality|ESSID'
iwlist wlan0 scan | grep 'Quality\|ESSID'