🌱 Best way to simulate group by from bash

Source

sort ip_addresses | uniq -c

if you have a list of numbers or text on your clipboard

1
2
3
2
3
1
1
1

then

pbpaste | sort | uniq -c

will give you a count of values column one is the count and column 2 is the key

4 1
2 2
2 3
Made by Brandon . If you find this project useful you can donate.