Minishell is one of the 42 projects.
It is a reimplementation of bash🐚
We implemented the main features of bash.
- search and launch the right executable (e.g.
./a.out
,/bin/ls
..) - builtins:
echo
,cd
,pwd
,export
,unset
,env
,exit
- file I/O management by redirection:
>
,>>
,<
,<<
- interprocess communication by pipes:
|
- signal:
Ctrl-C
,Ctrl-D
,Ctrl-\
- expand environment variables with/without single/double quotes (e.g.
$PWD
,'$PATH'
,"$HOME"
..) - expand exit status:
$?
- expand wildcards:
*
- control operators:
;
,&&
,||
-
readline
(It is used where the shell accepts commands)
brew install readline
Clone this repository.
git clone https://github.com/tobeshota/minishell.git
Change directory to this repository.
cd minishell
Compile to create an executable file: minishell
.
make
Execute.
./minishell