Skip to content

valdaarhun/tiny-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tiny shell

A tiny shell project implemented from scratch without external dependencies. The purpose of this project was to:

  • understand how parsing works
  • understand signal handling, process groups and controlling terminals
  • implement job control

Parsing

Features of the language

The shell's expressions are minimal and currently only support IO redirection and pipelining.

Grammar

statement -> expression [PIPE expression]* [AMPERSAND]
expression -> COMMAND [ARG]* [redirection]*
redirection -> operator STREAM
operator -> IN | OUT | APPEND

References

  1. https://cs.brown.edu/courses/cs033/docs/gearups/shell_2.pdf
  2. https://web.stanford.edu/class/archive/cs/cs161/cs161.1166/lectures/lecture9.pdf
  3. https://cr.yp.to/docs/selfpipe.html
  4. https://cs61.seas.harvard.edu/site/2018/Synch1/

About

A tiny shell with job control

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published