R4meau / Minishell
Licence: mit
As beautiful as a shell
Stars: ✭ 105
Labels
Projects that are alternatives of or similar to Minishell
Allegro5
The official Allegro 5 git repository. Pull requests welcome!
Stars: ✭ 1,165 (+1009.52%)
Mutual labels: unix
Xnotify
read notifications from stdin and pop them up on the screen
Stars: ✭ 97 (-7.62%)
Mutual labels: unix
Cli Boot.camp
💻 command-line bootcamp adventure in your browser
Stars: ✭ 88 (-16.19%)
Mutual labels: unix
Cross Platform Node Guide
📗 How to write cross-platform Node.js code
Stars: ✭ 1,161 (+1005.71%)
Mutual labels: unix
Screen Recorder Ffmpeg Cpp
*Multimedia project* A screen recording application to capture your desktop and store in a video format. Click here to watch the demo
Stars: ✭ 98 (-6.67%)
Mutual labels: unix
Jobber
An alternative to cron, with sophisticated status-reporting and error-handling
Stars: ✭ 1,217 (+1059.05%)
Mutual labels: unix
Librepcb
A powerful, innovative and intuitive EDA tool for everyone!
Stars: ✭ 1,173 (+1017.14%)
Mutual labels: unix
Dte
A small, configurable console text editor (moved to https://gitlab.com/craigbarnes/dte)
Stars: ✭ 98 (-6.67%)
Mutual labels: unix
Imscript
a collection of small and standalone utilities for image processing, written in C
Stars: ✭ 86 (-18.1%)
Mutual labels: unix
Covise
Collaborative Visualization and Simulation Environment, OpenCOVER and OddLOT
Stars: ✭ 101 (-3.81%)
Mutual labels: unix
Minishell - @42Born2Code
As beautiful as a shell
About
Minishell is the second project of the Unix branch at 42. It's a minimum viable version of a real shell. The main goal is to have a good understanding of process creation and synchronisation using the C programmming language.
Installation & Usage
Requirements
The only requirements are:
- GNU make (v3.81)
- GCC (v4.2.1)
Those versions are the ones used during development.
Building the program
-
Download/Clone this repo
git clone https://github.com/r4meau/minishell
-
cd
into the root directory and runmake
cd minishell make
Running the program
After building the source, run ./minishell
from the project root.
Main Project Instructions
Mandatory
- Can only use C
- Must respect the school imposed coding style (The Norme)
- No memory leaks
- Implement a series of builtins:
echo
,cd
,setenv
,unsetenv
,env
,exit
- Manage the errors without using
errno
, by displaying a message adapted to the error output - Can only use these standard library functions:
- malloc, free
- access
- open, close, read, write
- opendir, readdir, closedir
- getcwd, chdir
- stat, lstat, fstat
- fork, execve
- wait, waitpid, wait3, wait4
- signal, kill
- exit
- Must have a Makefile to build the program
- The binary file must be named
minishell
- Can use Libft
- Handle program interruption (Ctrl + D)
- Click here for the rest
Bonuses
- Signal management (specifically Ctrl + C)
- PATH's right management (error handling)
- Multiple commands (semi colons)
Notes
- You can find the project instructions by clicking here
- I commented the whole codebase so it's easy to navigate and understand it.
- No need to mention the odd spacing in files, I'm using a tab size of 4.
- There are probably better ways to implement it, we are limited by a set of functions at my school (just to make it harder and give us a deeper understanding of what's happening in the back), please, review the project instructions before you explain how
X
orY
would have been a better way to do it ;)
Sponsors
Enjoy!
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].