On Thu, Sep 29, 2022 at 08:39:16PM +1000, Jonathan Gray wrote: > wc counts items in files. Finding the longest item indeed sounds > like a task better suited to awk.
Finding outliers, means and counting are all parts of the same basic class of operations. A good implementation of all of them requires constant space and a fixed time per input character. An implementation in awk will generally not have that property. Joerg