Skip to content

elinakly/minishell42

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Minishell

This project is part of the 42 School curriculum. Minishell is a simple Unix shell implementation in C that replicates key features of Bash.


πŸ› οΈ Features

βœ… Command parsing (with quotes, special characters)

βœ… Built-in commands (cd, echo, pwd, export, unset, env, exit)

βœ… Execution of external programs using PATH

βœ… Pipes (|) and redirections (>, <, >>, <<)

βœ… Environment variable handling

βœ… Custom prompt display

βœ… Command history (without using read_history())


βš™οΈ How to Build

git clone git@github.com:elinakly/minishell42.git
cd minishell42
make

πŸš€ Usage

./minishell

You’ll see a custom prompt where you can run commands like:

  • ls -la | grep minishell
  • echo $HOME
  • cat file.txt > out.txt

πŸ“š Project Rules

  • Only allowed to use specific system calls and standard library functions
  • Must handle signals (CTRL+C, CTRL+) properly
  • Built-in commands must work with and without pipes

πŸ’ File Structure

minishell/
β”œβ”€β”€ src/          # source files
β”œβ”€β”€ include/      # header files
β”œβ”€β”€ lib/          # libraries (if any)
β”œβ”€β”€ Makefile

πŸ’‘ What I Learned

  • Building a shell from scratch
  • Process management (fork, exec, wait)
  • File descriptors and pipes
  • Signal handling
  • Memory management and avoiding leaks
  • Linked lists for command management

πŸ’Š Author

Made by Me and Mika at 42 School.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •