← All projects

Project 06

Bash & awk Data Tools

Two command-line tools in Bash and awk for tabular data, an energy-statistics query tool and a data-cleaning pipeline, with input validation and error handling.

  • Complete
  • 2025
  • Individual project (UWA)

Overview

Two command-line tools for tabular data, written for UWA's Open Source Tools and Scripting unit (CITS4407) in 2025. One answers minimum and maximum questions about electricity generation in a CSV file. The other counts empty cells in a semicolon-separated dataset, cleans it into a tab-separated file and reports summary statistics.

My role

Individual project. I wrote both tools.

What I did

  • Built a query tool that finds the minimum or maximum solar, wind or coal generation for a country code or a year, including ties.
  • Built a pipeline that counts empty cells per column, cleans the raw file (separators, decimal commas, non-ASCII characters, carriage returns, missing IDs) and reports the most common values and two correlations.
  • Validated every input (argument count, file existence, empty files, separators, allowed values) before doing any work.
  • Printed errors to stderr with non-zero exit codes, keeping data on stdout so the output can be piped.