1 2 3
#!/bin/sh k=`ip a s dev wlp0s20f3 scope global | grep inet6 | grep -v fd16 | cut -d\ -f6 | cut -d/ -f1 | head -n1` echo -n $k