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))
|
||||||
|
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/\/.*//’) ((enjoy)) |
||||||
|
Copyright © 2012 Guru dell'Eccelso Picco - All Rights Reserved |
||||||