-
Minishellis the first group project we have to do at 42lausanne. This project makes you code a minimalistic shell following bash behaviour in C. -
As we can choose our teammate, the team will be composed of lray (@Ray-cmd) & mflury (@FizzYxWizzY).
- First, git clone the repository:
git clone https://github.com/Ray-cmd/minishell Minishell_42
- Then, compile the project at the root of the repository:
make
- Finally, launch the minishell:
./minishell
-
Minishell gives you a prompt while waiting for commands.
-
It checks if all the passed arguments are valid and makes an
abstract syntax treeout of them. categorizing them such ascommand,argument,file,redirectionandpipe. -
Then it runs executables if it can find a valid path to them using the environement variable
$PATHor by their path dirctly. (eg:lsand/bin/lsbasically giving the same result) -
Otherwise, it looks if its a builtins, such as
echo,cd,pwd,export,unset,envandexit. -
Minishell also have to manage some signals, such as
Ctrl-C,Ctrl-DandCtrl-\that should reproduce bash behavior.
- The
readlinefunction has leaks that we dont have to correct for the project.