-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Skwar wrote:
> Arturo 'Buanzo' Busleiman schrieb:
> 
> 
>>What about
>>
>>ip addr show dev eth0 | awk '{print $2}' | grep -v \: | head -n 1 | cut -d'/' 
>>-f1
> 
> 
> IMO, too many different commands to be elegant...

But simple. The idea of writing scripts is that any non-guru will understand it 
easily.

For a **very** simple unix-scripter

awk means: print fields
grep: print [non] matching
head: from start....
tail: from end....
cut: name says it all

- --
Arturo "Buanzo" Busleiman - www.buanzo.com.ar
Consultor en Seguridad Informatica
KTP Consultores - info AT ktpconsultores.com.ar

Romper un sistema de seguridad los acerca tanto a ser hackers como el
encender autos puenteando los convierte en ingenieros automotrices.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDa6ryAlpOsGhXcE0RApZNAJ45EF9Wpx7zd6OFdnVJDvprvJUCdACffH3e
dNJFp0K6Ya1gVY3qHOfEOGU=
=DrbN
-----END PGP SIGNATURE-----
-- 
gentoo-user@gentoo.org mailing list

Reply via email to