env variable mac address script problems
I have been trying for days to try and get the following script to load the mac variable upon boot in the rc.local file and just can't seem to get it to work. It does work when I manually run the line but when I run it as a normal sh script, it doesn't work.
mac=`ifconfig -a eth0 | grep "HWaddr" | cut -d " " -f 11` | tr -s : .
Maybe there is a different way of accomplishing this, all I want is a variable with my eth0 mac address with . instead of : seperating them. Any help would be greatly appreciated.
Thanks so much!!
Chris
|
Recent comments
1 day 5 min ago
1 day 10 min ago
1 day 5 hours ago
1 day 11 hours ago
1 day 12 hours ago
1 day 13 hours ago
1 day 18 hours ago
2 days 51 min ago
2 days 4 hours ago
2 days 6 hours ago