← Back to selected work

minishell

A small UNIX shell implementing command parsing, environment expansion, pipes, redirections, built-ins, process execution, and interactive signal behavior.

Role
Lead Architect
Access
1337 / 42 validated project
[01]

Context

A small UNIX shell implementing command parsing, environment expansion, pipes, redirections, built-ins, process execution, and interactive signal behavior.

[02]

My responsibility

Built and validated through the 1337 / 42 project curriculum, with direct responsibility for implementation, debugging, testing, and evaluation requirements.

[03]

System scheme

Engineering scheme

Shell parse-to-execution pipeline

Input → Processing → Output

Interactive input moves through lexical analysis and expansion before process, pipe, redirection, and signal orchestration.

  1. 01

    Readline input

    Capture interactive commands and maintain history.

  2. 02

    Tokenizer

    Recognize words, quotes, pipes, and redirection operators.

  3. 03

    Expansion

    Resolve environment variables and quote-sensitive text.

  4. 04

    Command model

    Build executable stages with arguments and redirections.

  5. 05

    Process executor

    Create pipes, fork commands, and run built-ins correctly.

  6. 06

    Status and signals

    Restore descriptors and expose shell-compatible exit state.

File descriptors
Process groups
Quote rules
Interactive signals
[04]

Implementation breakdown

  1. 01

    Capability 01

    Tokenizer and parser for commands, pipes, quotes, and redirections.

  2. 02

    Capability 02

    Bash-compatible built-ins including cd, echo, export, unset, env, and exit.

  3. 03

    Capability 03

    Interactive handling for Ctrl+C, Ctrl+D, and Ctrl+\.

[05]

Technical scope

C01
AST Parsers02
UNIX Processes03
File Descriptors04
[07]

Implementation details

  • Tokenizer and parser for commands, pipes, quotes, and redirections.
  • Bash-compatible built-ins including cd, echo, export, unset, env, and exit.
  • Interactive handling for Ctrl+C, Ctrl+D, and Ctrl+\.
[08]

Engineering constraints

  • Coordinating multi-process pipelines without leaking file descriptors.
  • Matching shell quoting and environment-expansion rules across parser states.
[10]

Project gallery

minishell project view 1

Need a system like this?

Tell me about the workflow, integration, or backend problem.

Discuss a project