Tyson Zinn
$ ifconfig | head -n 2 | tr -d '\n' | sed -n 's/.*\(00:[^ ]*\).*\(adr:[^ ]*\).*/mac:\1 - \2/p'
Print the IP address and the Mac address in the same line
by David Winterbottom (codeinthehole.com)
No comments:
Post a Comment