Awk Tips Tricks
Awk to sort by line length: $ wc -l /usr/share/dict/words 483523 /usr/share/dict/words $ awk ‘{ print length(), $0 | “sort -n” }’ /usr/share/dict/words Remove blank lines and print the 7th field awk ‘NF > 1 {print $7}’ input Quick Combo Demonstration: # cat /tmp/freemem.drmets total used free shared buffers cached Mem: 125 9 115 0 […]