Hands-on task
awk: sum by group
/root/spend.txt has two columns: a category and an amount. Sum the amounts for each category and write lines of the form category amount to /root/by_cat.txt. The order of the lines doesn't matter.
- awk
- associative array
- grouping by key
- for-in loop
- END block