My own shell written in C which implements a command line interface similar to well-known shells, such as bash.
The program:
- Prints an interactive input prompt
- Parses command line input into semantic tokens
- Implements parameter expansion
- Shell special parameters
$$,$?, and$! - Tilde (~) expansion
- Shell special parameters
- Implements two shell built-in commands:
exitandcd - Executes non-built-in commands using the the appropriate
EXEC(3)function. - Implements redirection operators ‘<’ and ‘>’
- Implements the ‘&’ operator to run commands in the background
- Implements custom behavior for
SIGINTandSIGTSTPsignals
- Input
- Word splitting
- Expansion
- Parsing
- Execution
- Waiting