https://github.com/almayor/minishell
A personal implementation of a minimal Linux shell
https://github.com/almayor/minishell
21school 42 42school linux minishell
Last synced: 2 months ago
JSON representation
A personal implementation of a minimal Linux shell
- Host: GitHub
- URL: https://github.com/almayor/minishell
- Owner: almayor
- License: mit
- Created: 2020-09-12T18:03:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-27T05:20:15.000Z (over 4 years ago)
- Last Synced: 2025-01-30T05:26:43.234Z (4 months ago)
- Topics: 21school, 42, 42school, linux, minishell
- Language: C
- Homepage:
- Size: 2.54 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# minishell
*This project is part of the official curriculum at [School 42](https://en.wikipedia.org/wiki/42_(school)).*
## Disclaimer
> In [School 42](https://en.wikipedia.org/wiki/42_(school)), almost every project must be written to comply with a coding standard (also known as the "[Norm](./docs/subjects/norme.en.pdf)"). As a result, the implementation of certain parts may appear strange.
## Overview
* [Official instructions](docs/subjects/minishell.en.pdf)
* A personal implementation of a Linux shell with minimal functionality
* builtins: `cd`, `env`, `setenv`, `unsetenv`, `echo`, `exit`
* separation of commands with `;`
* management of `SIGINT` and `SIGTERM`
* an informative user prompt
* Only the following functions are allowed
* `malloc`, `free`
* `access`
* `open`, `close`, `read`, `write`
* `opendir`, `readdir`, `closedir`
* `getcwd`, `chdir`
* `stat`, `lstat`, `fstat`
* `fork`, `execve`
* `wait`, `waitpid`, `wait3`, `wait4`
* `signal`, `kill`## Run
To compile, run
```sh
git clone https://github.com/almayor/minishell
cd minishell
git submodule --init --recursive
make
```
You can run unit tests with `make test`## Resources
*
## Acknowledgements
We are grateful to the entire team behind School 42 and its [Moscow branch](https://21-school.ru
), as well as to my fellow students for help and support.---
If you have any questions, please contact me on Github.