bsh Posted January 8, 2012 Share Posted January 8, 2012 I'm writing a shell script to automate changing my mac addresses. How can I set a variable to equal a mac? for example #!/bin/bash #chg mac and bring up interfaces ifconfig wlan0 down ifconfig wlan1 down macchanger -r wlan0 macchanger -r wlan1 ifconfig wlan0 up ifconfig wlan1 up #GW is new mac address for wlan0 GW=xx:xx:xx:xx:xx:xx #SNIFF is new mac address for wlan1 SNIFF=yy:yy:yy:yy:yy:yy Is there a command that will only return the mac or how do I parse the output of macchanger -s ? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.