tmpfs.tech · all tracks · Text Processing

Sum Amounts Per Group

Text Processing · medium · solved in-browser (no VM needed) · 3 tiered hints

Write /home/player/bycat.sh: a bash script that reads the comma-separated /opt/data/expenses.csv (a header line, then rows of category,amount), and for each distinct category prints 'category total' where total is the summed amount for that category. Skip the header. Use an awk associative array keyed by category, summing in the main block and printing with a for-in loop in an END block. (Authored config, graded structurally — the engine isn't run here.)

▶ Start this challenge

Nobody has solved this one yet — be the first clear on the leaderboard.

How it works

Open the challenge and an in-page editor appears — write your answer and tmpfs.tech grades it server-side against the same checks a real box would run. No VM, no install, no signup needed to try.

More Text Processing challenges

grep, sed, awk, cut and friends — extract and reshape text and logs.

See all Text Processing challenges →

FAQ

Is it free? Yes — play as a guest, no signup required to start.

Do I need to install anything? No. Everything runs in your browser.

How is it graded? Automatically and deterministically — your work is checked against the exact rules the live box would apply.