I am writing a #!bin/bash
shell script to automate MAC spoofing. In the script that I have written I make the outputs of ifconfig -a | grep HWaddr
equivalent to two different variables. The command ifconfig -a | grep HWaddr
returns
eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
and
wlan0 Link uncap: Ethernet HWaddr 00:00:00:00:00:00
but I want the command to return just the MAC address for wlan0
.