3 ms·
Someone else mentioned using a hash table to accumulate counts; that approach would give something like ~/bin/freq ========== #! /bin/bash awk '{acc[$
by kmstout 4y ago
Someone else mentioned using a hash table to accumulate counts; that approach would give something like
~/bin/freq
==========
#! /bin/bash
awk '{acc[$0]++} END {for (item in acc) {print acc[item], item}}' | sort -nr