This project is about creating our own Shell with basic functions. It is a group project done with Jakob Schott
The full subject can be found here.
Clone the library and use make
to compile
git clone https://github.com/theozanchi/42_Berlin_minishell/tree/main
cd 42_Berlin_minishell
make
The program is launched without any argument and can be used like any other shell:
- Functioning work history, saved under the home folder of the user (
.minishell_history
) - Piped commands
|
- Redirections
<
,>
,<<
and>>
- Signals
SIGINT
andSIGQUIT
(same behaviour as bash) - Some commands are implememted as built-in commands:
echo
with option-n
cd
with only a relative or absolute pathpwd
with no optionsexport
with no optionsunset
with no optionsenv
with no options or argumentsexit
with no options
sources/1_lexer
: tokenizes the user input (collected throughreadline
) and performs a first lexical analysissources/2_parser
: loads the user input into the main data structure and aggregates it as achar**
sources/3_executer
: creates pipes and child processes to execute the command. Built-ins are executed in the main process whereas other commands are executed in a dedicated child process