[Final Grade: A] Unix project from computer science School
Minishell2: Reproduce a shell
mkdir test ; cd test ; ls -a ; ls | cat | wc -c > tutu ; cat tutu
42sh: Reproduce an advanced shell
Description:
You must write a Unix SHELL.
The project consists of two sections:
• a mandatory section, which MUST be completed: display a prompt, parse and execute some commands (see below),
• an optional section, which will only be evaluated if the mandatory section is fully functionnal.
Authorized functions: all functions included in the libC or the ncurses library.
Mandatory:
• spaces and tabs,
• $PATH and environment,
• errors and return value,
• redirections (‘<’, ‘>’, ‘<<’ and ‘>>’),
• pipes (‘|’),
• builtins: cd, echo, exit, setenv, unsetenv,
• separators: ‘;’, ‘&&’, ‘||’
Optional:
• inhibitors (‘\’),
• globbings (‘*’, ‘?’, ‘[’, ’]’),
• job control (‘&’, fg),
• backticks (“’),
• parentheses (‘(’ and ‘)’),
• variables (local and env),
• special variables (term, precmd, cwdcmd, cwd, ignoreof for instance),
• history (‘!’),
• aliases,
• line edition (multiline, dynamic rebinding, auto-completion dynamic,
• scripting (a bit harsh though).