Skip to content

simonzsh/42-Minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

118 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

42-Minishell

Overview

The minishell project is a basic shell program created as part of 42 School. It replicates essential features of a Unix shell, including executing commands, handling pipes and redirections, and managing environment variables. This project is an introduction to the world of system programming, process creation, and signal handling in C, giving students insight into how a shell operates internally.

Getting started

To compile and execute minishell, you will need to install readline library.

If you are on macOS, make sure you have installed Xcode Command Line Tools and Homebrew.

  • Linux
sudo apt install libreadline-dev
  • macOS
brew install readline

Once readline is installed, you can continue with the following steps.

  1. Clone this repository
git clone https://github.com/extrymes/42-Minishell.git
cd 42-Minishell
  1. Compile and launch the program
make
./minishell

Features

  • Running executables located in PATH environment variable.
  • Running built-in commands like echo, cd, pwd, export, unset, env, and exit.
  • Handling pipe (|), heredoc (<<) and redirections (<, >, >>).
  • Handling environment variables like bash.
  • Handling signals CTRL-C, CTRL-D, and CTRL-\ like bash.

Contributing

We welcome contributions from everyone! Whether you're fixing bugs, adding new features, improving documentation, or simply sharing your ideas, your input is greatly appreciated.

Thanks for visiting and happy coding!

About

Building a UNIX shell with parsing, execution, and built-in commands 📟

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors