--- layout: post title: Walking /proc/net/netstat like a pro with awk category: GNU/Linux tags: - networking --- Little snippet to parse `/proc/net/netstat` and format the output: ```bash awk '{for(i=1;i<=NF;i++)title[i] = $i; getline; print title[1]; for(i=2;i<=NF;i++)printf " %s: %s\n", title[i], $i }' /proc/net/netstat TcpExt: ... IpExt: ... ```