Feel the awk power
Some of my favorite AWK expressions:
OSD_LISTEN_PORTS:$(netstat -tlpn | awk -F ":" '/ceph-osd/ { sub (" .*", "", $2); print $2 }' | uniq) |
Because
grep foo | awk '{print $1}'
is not elegant!
Some of my favorite AWK expressions:
OSD_LISTEN_PORTS:$(netstat -tlpn | awk -F ":" '/ceph-osd/ { sub (" .*", "", $2); print $2 }' | uniq) |
Because
grep foo | awk '{print $1}'
is not elegant!
Comments