Re: Bash scripting help...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux