Or even easier: ip=$(/sbin/arping -f -I eth0 10.255.255.1 | grep Unicast | awk '{print substr($5,2,17)}') This greps for the line with the MAC, then using awk prints out the 5th field (space delimited by default so this is the MAC with the [ and ]), and using substr I carve out the MAC by saying I want the 5th field ($5), starting at the 2nd character, for 17 characters. Jacques B. -- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list