[ale] scripting challenge du'jour
Richard Kolkovich
sarumont at sigil.org
Wed Jul 5 20:54:32 EDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/05/06 20:47, Brian J. Dowd published:
> /sbin/ifconfig | grep inet\ | sed -e 's/:/\ /g' | sed -e '/127.0.0.1/d'
> | awk -F\ '{print $3"/"$7"\t\t"$5}'
> (removed the "- " at the beginning on the second line...)
Hrm...how did that get in there... *shrug*
> Nice! Job!
Thanks. ;)
- --
Richard Kolkovich
sarumont at sigil.org
> On 07/05/06 19:19, Jim Popovitch published:
>
>>>> What's the fastest, cleanest, most optimized, shell script (non perl,
>>>> etc) method to take the output of ifconfig and produce a list that
>>>> resembles this:
>>>>
>>>> 192.168.4.5/255.255.255.0 192.168.4.255
>>>> 172.16.8.12/255.255.0.0 172.16.255.255
>>>>
>>>>
>>>> Go!
>>>>
>>>> -Jim P. (TIA ;-))
>>>>
> ifconfig | grep inet\ | sed -e 's/:/\ /g' | sed -e '/127.0.0.1/d' | awk
> -F\ '{print $3"/"$7"\t\t"$5}'
>
> That was fun. ;)
>
> --
>
> Richard Kolkovich
> sarumont at sigil.org
>
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
>>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFErF9IfXtD1KVAIbARAtMFAKD4ftPN3rU0qwJOUpQtPxaGgCipsgCeJx16
ehinj9hllMRCORW2MNEP4TA=
=StLG
-----END PGP SIGNATURE-----
More information about the Ale
mailing list