I'm trying to extract the MAC address for a wireless card then insert it into a bash script as a VAR variable with an incremental change. So..
$ ifconfig wlan1 | grep HWaddr wlan1 Link encap:Ethernet HWaddr XX:xx:XX:xx:XX:xx
Now I need to command line extract just the XX:xx:XX:xx:XX:xx and add it to the script with a +1 VAR . Which seems pretty straight forward if I can extract just the XX:xx:XX:xx:XX:xx from the grep above. (ie How to increment a variable in bash? )
Can anyone see a roadblock to adding a MAC address as a variable in a bash script? ie without bash thinking the MAC is a string calculation or erroneous command ?