← Sortir de la missionExit mission
← Index des missionsMission index

M-06 / 06

42sh

Un shell Unix en C, mission d'équipage Epitech à quatre.A Unix shell in C, a four-person Epitech crew mission.

RôleRole
Développement · équipe de 4Development · crew of 4
LancementLaunch date
20262026
SystèmesSystems
C · Unix · Make
Status
COMPLETED
LienLink
Démo sur demandeDemo on request

FIG. 01 — 42sh46.56° N · 3.33° E

(01) Briefing

Une mission d'équipage Epitech : réécrire un shell Unix en C, à quatre.

(02) Problème

Entre une ligne tapée et un processus lancé, il se passe beaucoup de choses : parsing, fork, pipes, redirections, signaux. Les réécrire, c'est les comprendre vraiment.

(03) Ce que j'ai construit

Un shell en C avec tokenizer et arbre syntaxique :

  • Pipes, redirections, heredocs, sous-shells, backticks
  • Opérateurs logiques, alias, variables, historique
  • Contrôle des jobs

(04) Architecture

La ligne est découpée en jetons, assemblée en arbre syntaxique, puis l'arbre est exécuté nœud par nœud — chaque commande devient un processus.

  1. 01 Ligne
  2. 02 Tokenizer
  3. 03 Arbre
  4. 04 Exécution
  5. 05 Processus

(05) Résultat

  • Pipes, redirections, sous-shells et job control fonctionnels
  • Historique et alias
  • Tests unitaires jusque sur les échecs d'allocation

(06) Prochaine mission

  • Complétion à la tabulation
  • Scripts avec structures de contrôle

(01) Briefing

An Epitech crew mission: rewrite a Unix shell in C, as a team of four.

(02) Problem

A lot happens between a typed line and a running process: parsing, fork, pipes, redirections, signals. Rewriting them is how you really understand them.

(03) What I built

A C shell with a tokenizer and a syntax tree:

  • Pipes, redirections, heredocs, subshells, backticks
  • Logical operators, aliases, variables, history
  • Job control

(04) Architecture

The line is split into tokens, assembled into a syntax tree, then the tree is executed node by node — each command becomes a process.

  1. 01 Input line
  2. 02 Tokenizer
  3. 03 Tree
  4. 04 Execution
  5. 05 Process

(05) Outcome

  • Working pipes, redirections, subshells and job control
  • History and aliases
  • Unit tests down to allocation failures

(06) Next mission

  • Tab completion
  • Scripting with control structures

● MISSION SUIVANTENEXT MISSION · M-01

AI Operator →

Un assistant IA qui gère la boîte mail, le CRM, les devis et les relances d'une PME.An AI assistant running a small business's inbox, CRM, quotes and follow-ups.

Lancer la missionLaunch mission →