[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/5] hotplug/linux: Add IPv6 support to vif-route
>> +## >> +# ip6_of interface >> +# >> +# Print the first IPv6 address currently in use at the given interface, or >> nothing if >> +# the interface is not up. >> +# >> +ip6_of() >> +{ >> + ip -6 addr show primary dev "$1" | perl -wane '/scope global/ && >> /inet6 (([0-9a-f]+:*)+)/ && print $1;' > > Hrm, Perl again. Can this be done with awk? Looks tricky though. > Changed to : ip -6 -o addr show primary dev "$1" scope global | awk '$3 == "inet6" {split($4,i,"/"); print i[1]; exit}' which is now very similar to the ip_of() function. Cheers, Sylvain Munaut _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |