There are several network interfaces and while listing all of them with ifconfig, I'd like to keep just the interface name and MTU.
In other words, how to transform something like this:
$ ifconfig
cali0a56gaa5a33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 8122
inet6 fe80::ecee:eeff:feee:eeee prefixlen 64 scopeid 0x20<link>
ether ee:ee:ee:ee:ee:ee txqueuelen 0 (Ethernet)
RX packets 12890 bytes 129366676 (129.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16107 bytes 129601562 (129.6 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
cali4edac9c332d: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 8122
inet6 fe80::ecee:eeff:feee:eeee prefixlen 64 scopeid 0x20<link>
ether ee:ee:ee:ee:ee:ee txqueuelen 0 (Ethernet)
RX packets 111555 bytes 9806510 (9.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 148838 bytes 151003850 (151.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
into this:
cali0a56gaa5a33: mtu 8122
cali4edac9c332d: mtu 8122
The command $ ifconfig | awk '{ print $1 " " $3 " " $4 }' does the job partially: MTU gets displayed, but all indented rows appear as well.