minishell
is a custom shell implementation in C, developed as part of the 42Paris curriculum. This project helped me appreciate the work done by the older generation of developers, gain a better understanding of how the shell works, and solidify my knowledge and skills in C and shell programming.
- Display a prompt when waiting for a new command.
- Working command history.
- Execute commands based on the PATH variable or using relative/absolute paths.
- Handle single and double quotes.
- Implement redirections (
<
,>
,<<
,>>
). - Implement pipes (
|
). - Handle environment variables (
$
). - Handle special variables (
$?
). - Handle
ctrl-C
,ctrl-D
, andctrl-\
like in bash. - Built-in commands:
echo
,cd
,pwd
,export
,unset
,env
,exit
.
- Language: C
- External Libraries:
readline
- System Calls:
fork
,execve
,pipe
,dup2
,signal
, etc.
- GCC or any C compiler
- GNU Make
-
Clone the repository:
git clone https://github.com/Agrippa2023/minishell.git cd minishell
-
Build the project:
make
Run the shell:
./minishell
src/
: Source filesinclude/
: Header fileslibft/
: Custom C library used throughout the 42Paris curriculum- Contains various utility functions like
ft_atoi
,ft_strlen
,ft_split
, etc.
- Contains various utility functions like
Makefile
: Build script
This project was developed as part of the 42Paris curriculum. Special thanks to the 42 community for their support and resources.
Distributed under the MIT License. See LICENSE
for more information.