Bash scripting help...
Oliver Schulze L.
oliver at samera.com.py
Tue Aug 8 21:38:38 UTC 2006
You can try this:
MAC=$(arping -f -I eth0 $ipnumber | grep reply | tr -s ' ' | tr ']' '['
| cut -d '[' -f 2)
echo "MAC: $MAC"
You can debug like this:
echo "Unicast reply from 10.0.0.3 [00:0C:29:C8:DE:E2] 1.040ms" | grep
reply | tr -s ' ' | tr ']' '[' | cut -d '[' -f 2
HTH
Oliver
--
Oliver Schulze L.
Get my e-mail after a captcha test in: http://tinymailto.com/oliver
More information about the fedora-list
mailing list