Re: [shell-script] Ifconfig + Cut

2010-03-07 Por tôpico Anderson Duarte
Valeu! a do Hebert foi a melhor. :D Em 7 de março de 2010 19:47, Herbert Faleiros escreveu: > > > On Sun, Mar 7, 2010 at 5:19 PM, Anderson Duarte > > wrote: > > $ ifconfig eth0 | grep HW | cut -c48- > > 00:1e:68:d9:b6:34 > [...] > > > Tem algo melhor que isso ? > > cat /sys/class/net/eth0/address

Re: [shell-script] Ifconfig + Cut

2010-03-07 Por tôpico Herbert Faleiros
On Sun, Mar 7, 2010 at 5:19 PM, Anderson Duarte wrote: > $ ifconfig eth0 | grep HW | cut -c48- > 00:1e:68:d9:b6:34 [...] > Tem algo melhor que isso ? cat /sys/class/net/eth0/address -- Herbert

Re: [shell-script] Ifconfig + Cut

2010-03-07 Por tôpico Marcos Arouca
$ ifconfig | grep -oE '([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}' []´s Att, Marcos Arouca 2010/3/7 Anderson Duarte > > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Pessoal, quero pegar apenas o MAC de uma placa de rede. > Fiz o seguinte: > > $ ifconfig eth0 | grep HW | cut -c48- > 00:1e:6

[shell-script] Ifconfig + Cut

2010-03-07 Por tôpico Anderson Duarte
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pessoal, quero pegar apenas o MAC de uma placa de rede. Fiz o seguinte: $ ifconfig eth0 | grep HW | cut -c48- 00:1e:68:d9:b6:34 Funciona, mas achei um pouco deselegante com 2 pipes... Tem algo melhor que isso ? -BEGIN PGP SIGNATURE- Versio