42sh is one of the final branch's project in the 42 cursus, whose goal was to implement a shell, our ability to contribute to a big project in a group has also been tested.
We deviated from a base of mine but the final project was the result of the contribution of Jeremi Raymond, Sebastien Le Rest, Gaetan Dufay and me Mohammed Merabet, we each worked on different aspect of the project but my main duty was to make all the abstraction and the genericity of a system that should simplify the addition of new features.
Thanks to that abstraction, it was easier to get the project at its full potential. For example adding features that were not mandatory, such as shell scripting and job control.
Thanks to our hard work we got a final grade of 121 !
- Prompt display.
- Command line edition.
- Bultins:
cd,env,setenv,unsetenv,echoandexit. - Executing commands from the
PATHenvironnement variable. - The logical operators
&&and||. - The
;separator.
- Inhibitors
"(double quotes),'(simple quotes) and\(backslash). - Heredoc
<<and file descriptor aggregations. - Globbing :
*,?,[],{}, etc. - Command substitution
``and$(). - Subshells
(command list)and command groups{ command list }. - Local variables and
unset,set,exportbuiltins. historybuiltin, (the!feature is not handled).- A complete line edition (i.e the ability to edit a line with various keyboard shortcut).
- The builtin
read. - Dynamic autocompletion.
- Job control with the
jobs,fg, andbgbuitlins and the&operator. - Shell script.
- Arithmetic expansions
$((...))and$[...]. - Positional argument expansion
$0,$1... and$@. - The
PROMPTenvironnement variable to change the prompt in real time. - Functions with the
:=operatorfunc_name := { command list }. ifandwhilekeywordif command then commandorif command then { command list }or evenif { command list } then { command list }.- The
.42shrcfile in the home directory, that is executed at the beginning of the shell. -coption to give a command in parameter./42sh -c 'echo Hello World'.
- Jeremi Raymond, (The rigorous)
- Sebastien Le Rest, (The bug finder)
- Gaetan Dufay, (The stagiaire)
- Mohammed Merabet, (The genius and The modest)
**FINAL GRADE: 121**