News for hackers. Stuff that matters.
Re:The Beauty of Unix Pipelines (2020) by kmstout on Sunday June 05, 2022 @12:43AM (#31628082)
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

There are no comments on this comment yet.