方法:
ip -o addr | awk '/inet/{print $2,$4}'
[root@logstash ~]# ip -o addr | awk '/inet/{print $2,$4}'
lo 127.0.0.1/8
lo ::1/128
ens32 192.168.10.244/24
ens32 192.168.10.240/32
ens32 fe80::8a95:e8a5:7963:6213/64
docker_gwbridge 172.19.0.1/16
docker_gwbridge fe80::42:78ff:fe53:75fe/64
docker0 172.17.0.1/16
ens32.100 fe80::20c:29ff:feed:c6f8/64
ens32.200 fe80::20c:29ff:feed:c6f8/64
vethe083b32 fe80::2817:f1ff:fe8a:aa73/64
[root@logstash ~]#