An open API service indexing awesome lists of open source software.

https://github.com/lschrafstetter/42_minishell

This is the "minishell" project of the 42 School core curriculum. The goal was to create a simple shell on the basis of bash in C.
https://github.com/lschrafstetter/42_minishell

42 42wolfsburg bash minishell shell

Last synced: about 2 months ago
JSON representation

This is the "minishell" project of the 42 School core curriculum. The goal was to create a simple shell on the basis of bash in C.

Awesome Lists containing this project

README

          

# minishell

This is the minishell project of the 42 School core curriculum (mini bash clone).

![image](https://user-images.githubusercontent.com/98647720/191199572-97399e01-02a7-4319-a7e4-0249501796c8.png)

How to use it (Linux or macOS):
- clone the repo
- if the readline package is not installed: sudo apt-get install libreadline6 libreadline6-dev
- "make" via the Makefile
- ./minishell

The task was to create a mini bash clone with the following features:
- working history
- launch an executable (relative/absolute path or via PATH variable)
- handles ' " ' and ' ' '
- redirections ("<", "<<", ">", ">>")
- pipes (' | ')
- handles environment variables
- handles the command "&?"
- handles SIGINT and SIGQUIT
- the following builtins:
- echo with option -n
- cd
- pwd (no options)
- export (no options)
- unset (no options)
- env (no options or arguments)
- exit (no options)

Disclaimer:
This project was created as a school project with the strict 42 "Norminette" norm, including:
- variable declarations at the beginning of the file
- no declaration and initialization on the same line
- only while loops allowed
- only 25 lines per function
- only 5 functions per .c file
- no comments inside of functions
- more minor things...