Results 1 to 2 of 2
hi im trying to find a way to only show the interface name and interface mode from the iwconfig command. for example this is the output i get. Code: lo ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-19-2012 #1
- Join Date
- Dec 2012
trying to only output certain words from a command
hi im trying to find a way to only show the interface name and interface mode from the iwconfig command.
for example this is the output i get.
lo no wireless extensions. eth0 no wireless extensions. wlan1 IEEE 802.11bg ESSID:"*****" Mode:Managed Frequency:2.437 GHz Access Point: 00:FE:F4:6A:85:48 Bit Rate=48 Mb/s Tx-Power=20 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:off Link Quality=70/70 Signal level=-14 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:14 Invalid misc:80 Missed beacon:0
wlan0 managed wlan1 managed ... for however many wireless interfaces there is
- 12-19-2012 #2
- Join Date
- Dec 2011
- Turtle Island West
Try this (or a minor variant):
iwconfig | grep -A1 wlan | tr -d '\n' | tr -s [:blank:] | cut -d ' ' -f 1,5