"First they ignore you, then they laugh at you, then they fight you, then you win." M. Gandhi

La Fibra che Ride

Ubuntu 9.10 CountDown

Simple IPV4 to IPV6 address converter

A dirty 2 shell lines trick to convert a static IPV4 address in the corresponding IPV6:

ipv4=$( ip ad sh eth0 | grep “inet ” | awk ‘{print $2}’| sed -e ’s/\/.*//’)
printf “2002:%02x%02x:%02x%02x::1″ `echo $ipv4 | tr “.” ” “`

((enjoy))