← back to projects

case study

minishell

A Unix shell implementation in C covering parsing, expansion, redirections, pipelines, processes, signals, and memory management.

minishell project preview

overview

A low-level systems project that rebuilds core shell behaviour instead of delegating process execution and parsing to a high-level runtime. The code is split into parsing, expansion, execution, built-ins, redirection, signal handling, and cleanup responsibilities.

architecture

User input → syntax validation → parsing/tokenisation → quote handling and expansion → redirections/pipelines → command lookup/execution → process and signal management.

engineering focus

  • Unix process creation and process control.
  • File descriptors, pipes, redirections, and signal semantics.
  • Memory ownership, cleanup across execution paths, and low-level debugging.
  • Building a non-trivial command interpreter without relying on a high-level process runner.

highlights

  • Command execution through PATH plus built-ins including echo, cd, pwd, export, unset, env, and exit.
  • Pipes, input/output redirections, environment expansion, quoting, syntax validation, and signal handling.
  • Separate components for parsing, expansion, execution, built-ins, redirections, signals, and memory cleanup.
  • Valgrind tooling for leak checking and file-descriptor tracking.

project context

Built as part of the 42 Abu Dhabi curriculum.

project media

Existing portfolio media

minishell visual