https://github.com/mguardia10/42cursus_minishell
Recreating a shell in C using bash as a reference.
https://github.com/mguardia10/42cursus_minishell
42 42born2code 42cursus 42madrid 42projects minishell42
Last synced: 3 months ago
JSON representation
Recreating a shell in C using bash as a reference.
- Host: GitHub
- URL: https://github.com/mguardia10/42cursus_minishell
- Owner: MGuardia10
- Created: 2024-01-09T18:01:15.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-28T14:04:12.000Z (about 1 year ago)
- Last Synced: 2025-04-08T19:23:04.466Z (6 months ago)
- Topics: 42, 42born2code, 42cursus, 42madrid, 42projects, minishell42
- Language: C
- Homepage:
- Size: 247 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 42cursus_minishell
As beautiful as a shell. This project aims to create a minimal shell that can interpret and execute basic Unix operating system commands. GNU Bash 3.2 has been taken as a reference, as it is the default version on macOS for 42Madrid computers.This recreation of Bash supports redirections (<, >, <<, >>), pipes ( | ), single and double quotes, environment variables expansion and signals such as CTRL-D, CTRL-C and CTRL-\\. Also, we had to recreate as Builtin this list of commands: echo (with -n option), cd, pwd, export, unset, env, exit.


You can see the subject [**HERE.**](https://github.com/MGuardia10/42cursus/blob/main/subjects/en/minishell_subject_en.pdf)
## Preview
## Installing and running the project:
> ℹ️ Make sure you have *readline* library install on your computer. To install *readline* go see [WIKI](https://github.com/MGuardia10/42cursus_minishell/wiki/How-to-install-Readline).
1- Clone this repository
git clone https://github.com/MGuardia10/42cursus_minishell.git
2- Navigate to the new directory and run `make`
cd 42cursus_minishell
make
3- Start the shell, no parameters needed:./minishell
## Compiling the Program
The minishell program comes with a Makefile that includes the following rules:- `all`: compiles the program.
- `re`: recompiles the program.
- `clean`: removes obj directory with objects files.
- `fclean`: removes obj directory with objects files and minishell binary.## Disclaimer
> At [42School](https://en.wikipedia.org/wiki/42_(school)), almost every project must be written in accordance to the [Norm](https://github.com/MGuardia10/42cursus/blob/main/subjects/en/norm_en.pdf), the school's coding standard. As a result, the implementation of certain parts may appear strange and for sure had room for improvement.