https://github.com/pedrozappa/42_minishell
42 Project : minishell
https://github.com/pedrozappa/42_minishell
Last synced: 18 days ago
JSON representation
42 Project : minishell
- Host: GitHub
- URL: https://github.com/pedrozappa/42_minishell
- Owner: PedroZappa
- License: unlicense
- Created: 2024-05-29T19:34:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-09T15:25:07.000Z (6 months ago)
- Last Synced: 2024-12-09T16:35:49.168Z (6 months ago)
- Language: C
- Size: 16 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# minishell
> As beautiful as a shell
![]()
![]()
![]()
![]()
![]()
___
Table o'Contents
* [About ๐](#about-)
* [Features](#features)
* [Usage ๐](#usage-)
* [Tests & Debug ๐งช](#tests--debug-)
* [References ๐](#references-)
* [Shell/Bash](#shellbash)
* [Termios](#termios)
* [Readline](#readline)
* [Heredoc](#heredoc)
* [License ๐](#license-)# About ๐
Minishell is a project that aims to create a simple UNIX command-line shell. This project introduces students to the world of shells by implementing a mini version of bash.
# Features
- Parse and execute basic shell commands;
- Search & launch the right executable from absolute or relative path;
- Command history;
- Handle built-in commands (`cd`, `echo`, `pwd`, `export`, `unset`, `env`, `exit`);
- Support for pipes (`|`) and redirections (`<`, `>`, `>>`, `<<`);
- Environment variable
- export variables;
- unset variables;
- expand environment variables;
- Signal handling (`Ctrl-C`, `Ctrl-D`, `Ctrl-\\`);___
# Usage ๐
Clone the repository and cd into it:
```sh
git clone https://github.com/PedroZappa/42_minishell.git 42_minishell
```Build the program:
```sh
cd 42_minishell
make
```Run the program:
```sh
./minishell
```___
# Tests & Debug ๐งช
Run the following command and look at the `Test Rules ๐งช` & `Debug Rules ๏` to get a comprehensive list of all available test/debug commands:
```sh
make help
```> [!Note]
> If you use `tmux` you are in for treat ๐
___
# References ๐## Shell/Bash
- [Bash Reference Manual](https://www.gnu.org/software/bash/manual/bash.html)
- [Writing your own shell](https://www.cs.purdue.edu/homes/grr/SystemsProgrammingBook/Book/Chapter5-WritingYourOwnShell.pdf)
- [Shell Command Language](https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html)
- [Exit Codes and Their Meanings - Discovery Cluster / Slurm - USC Advanced Research Computing](https://hpc-discourse.usc.edu/t/exit-codes-and-their-meanings/414/2)## Termios
- [A Brief Introduction to Termios](https://blog.nelhage.com/2009/12/a-brief-introduction-to-termios/)
- [A Brief Introduction to Termios: termios(3) and stty](https://blog.nelhage.com/2009/12/a-brief-introduction-to-termios-termios3-and-stty/)## Readline
- [The GNU Readline Library](https://tiswww.case.edu/php/chet/readline/rltop.html)
- [Programming with GNU Readline](https://web.mit.edu/gnu/doc/html/rlman_2.html)## Heredoc
- [Bash Heredoc](https://linuxize.com/post/bash-heredoc/)# License ๐
This work is published under the terms of 42 Unlicense.