https://github.com/yvann-ba/minishell
Custom shell program 🐚 designed for effective command parsing, process execution, and managing shell environments
https://github.com/yvann-ba/minishell
42cursus command-line cprogramming shell signal-processing
Last synced: 4 months ago
JSON representation
Custom shell program 🐚 designed for effective command parsing, process execution, and managing shell environments
- Host: GitHub
- URL: https://github.com/yvann-ba/minishell
- Owner: yvann-ba
- Created: 2024-03-27T11:37:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-30T14:29:37.000Z (about 1 year ago)
- Last Synced: 2024-12-29T07:02:39.755Z (12 months ago)
- Topics: 42cursus, command-line, cprogramming, shell, signal-processing
- Language: C
- Homepage:
- Size: 1.1 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Minishell 🐚
Minishell is a simplified [Bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)) shell environment capable of parsing commands and launching executables with arguments, plus several built-in functions. 🚀
#### ⭐ My 42 score for this project:

#### 📄 Official 42 School Subject:
https://github.com/rphlr/42-Subjects/blob/main/common-core/minishell/en.subject.pdf
## How to use it :
#### (Works only on Mac or Linux)
```bash
# Clone the repository
git clone https://github.com/yvann-ba/minishell.git
# Navigate to the project directory
cd minishell
# Build the project using Make
make
# Run minishell and enjoy (:
./minishell
```
## Features 🌟
- Executes commands from an absolute, relative, or environment PATH like `/bin/ls` or `ls`.
- Supports single and double quotes.
- Redirections and pipes (`>`, `>>`, `<<`, `<`, `|`).
- Handles environment variables (`$HOME`) and the return code (`$?`).
- Ctrl-C, Ctrl-\, and Ctrl-D are implemented to handle interrupts and exits.
- Built-in functions: `echo`, `pwd`, `cd`, `env`, `export`, `unset`, and `exit`.
## Credits
#### This project was made with [Lilien](https://twitter.com/Lilien_RIG) in 3 months at [42 School](https://en.wikipedia.org/wiki/42_(school)).
- I was responsible for the parsing, environment variables, built-in functions, and signal handling.
- Lilien took care of the execution, heredoc, redirection and piping, input files.