Best way to simulate “group by” from bash? October 2, 2022 by Tarik sort ip_addresses | uniq -c This will print the count first, but other than that it should be exactly what you want.