Skip to content

Rewrite of a simplified UNIX shell – 42 Project with bonus

Notifications You must be signed in to change notification settings

WaRtr0/Minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub top language GitHub repo size GitHub Repo stars GitHub repo directory count GitHub watchers GitHub followers GitHub contributors GitHub last commit

Minishell


🚀 About

Minishell is a 42 school project that challenges you to recreate a simplified UNIX shell. This implementation supports pipes, redirections, environment variables, and other essential shell features - all while being limited to a select group of standard functions.

Realized by Androlink && WaRtr0

Example


⚙️ Features

📜 Built-in Commands

Command Options Supported
echo -n (no newline)
cd Relative/Absolute paths
pwd No options
export Variable assignment
unset Variable removal
env No arguments
exit Exit with status code

🔄 Operators

Operator Example
< (Input) grep 'test' < file.txt
> (Output) ls > output.txt
>> (Append) echo "text" >> file.txt
<< (Here doc) cat << LIMITER
| (Pipe) ls | grep .c
&& (And) make && ./app
|| (Or) invalid_cmd || echo "Error"
() (Grouping) (ls || echo Fail) && echo Done

🕹️ Interactive Mode

  • Handles unclosed quotes/multiline commands
  • Ctrl+C: New prompt on fresh line
  • Ctrl+D: Clean exit
  • Non-blocking Ctrl+\

🛠️ Installation

  1. Clone with submodules:
    git clone --recursive https://github.com/WaRtr0/Minishell.git
    cd Minishell
  2. Build:
    make -k
    
  3. Run:
    ./minishell
    

🔧 Constraints

  • Limited functions
  • Only 1 global variable allowed
  • Strict 42 norm
  • Zero memory leaks

About

Rewrite of a simplified UNIX shell – 42 Project with bonus

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published