[CentOS] GRabbing MAC address
Max Hetrick
maxhetrick at verizon.net
Thu Feb 28 13:56:49 UTC 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Toby Bluhm wrote:
> There's multiple spaces in the output that cut is hitting - use tr to
> reduce them.
>
> ifconfig | grep eth0 | tr -s ' ' ' ' | cut -d ' ' -f 5
Or:
ifconfig | grep eth0 | cut -d ' ' -f 11
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFHxr2hIXSX/6LmsXkRAuZcAJ9Yzxx2vuPhj8JEa1NIjrtXbpmEQQCfangU
eD8VSzg6fUrEN/jgPULWdEE=
=+Bez
-----END PGP SIGNATURE-----
More information about the CentOS
mailing list