As beautiful as a shell
Explore the docs »
Table of Contents
The objective of this project is create a simple shell. Yes, your own little bash or zsh. You will learn a lot about processes and file descriptors.
| Program name | minishell |
|---|---|
| Makefile | Yes |
| External functs. | printf, malloc, free, write, open, read, close, fork, wait, waitpid, wait3, wait4, signal, kill, exit, getcwd, chdir, stat, lstat, fstat, execve, dup, dup2, pipe, opendir, readdir, closedir, strerror, errno, getenv |
| Libft authorized | Yes |
| Description | Write a shell |
It must implement the builtins like in bash:
- echo with option ’-n’
- cd with only a relative or absolute path
- pwd without any options
- export without any options
- unset without any options
- env without any options and any arguments
- exit without any options
; in the command should separate commands like in bash.
’ and " should work like in bash except for multiline commands.
Redirections < > >> should work like in bash except for file descriptor aggregation.
Pipes | should work like in bash except for multiline commands.
Environment variables ($followed by characters) should work like in bash.
$? should work like in bash.
ctrl-C, ctrl-D and ctrl-\ should have the same result as in bash.
- Clone the repository
git clone https://github.com/pabloocg/minishell.git
- Enter the repository and run make
cd minishell && make
./minishell
Distributed under the GNU GPLv3. See LICENSE for more information.
Pablo Cuadrado García
Linkedin - pablocuadrado97@gmail.com