Pages

Thursday, September 11, 2014

Print the IP address and the Mac address in the same line

$ ifconfig | egrep -A2 "eth|wlan" | tr -d "\n"| sed 's/\-\-/\n/g'|awk '{print "mac: "$5 " " $7}' | sed 's/addr:/addr: /g'

Thx Mass1 for the sharing




commandlinefu.com


by David Winterbottom (codeinthehole.com)






from All commands http://ift.tt/WMpcw5

No comments:

Post a Comment