Gentoo Archives: gentoo-user

From: Arturo 'Buanzo' Busleiman <buanzo@××××××××××.ar>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] file with IP?
Date: Fri, 04 Nov 2005 18:46:17
Message-Id: 436BAAF2.5000003@buanzo.com.ar
In Reply to: Re: [gentoo-user] file with IP? by Alexander Skwar
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Alexander Skwar wrote:
5 > Arturo 'Buanzo' Busleiman schrieb:
6 >
7 >
8 >>What about
9 >>
10 >>ip addr show dev eth0 | awk '{print $2}' | grep -v \: | head -n 1 | cut -d'/' -f1
11 >
12 >
13 > IMO, too many different commands to be elegant...
14
15 But simple. The idea of writing scripts is that any non-guru will understand it easily.
16
17 For a **very** simple unix-scripter
18
19 awk means: print fields
20 grep: print [non] matching
21 head: from start....
22 tail: from end....
23 cut: name says it all
24
25 - --
26 Arturo "Buanzo" Busleiman - www.buanzo.com.ar
27 Consultor en Seguridad Informatica
28 KTP Consultores - info AT ktpconsultores.com.ar
29
30 Romper un sistema de seguridad los acerca tanto a ser hackers como el
31 encender autos puenteando los convierte en ingenieros automotrices.
32 -----BEGIN PGP SIGNATURE-----
33 Version: GnuPG v1.4.1 (GNU/Linux)
34 Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
35
36 iD8DBQFDa6ryAlpOsGhXcE0RApZNAJ45EF9Wpx7zd6OFdnVJDvprvJUCdACffH3e
37 dNJFp0K6Ya1gVY3qHOfEOGU=
38 =DrbN
39 -----END PGP SIGNATURE-----
40 --
41 gentoo-user@g.o mailing list