All Projects → R4meau → Minishell

R4meau / Minishell

Licence: mit
As beautiful as a shell

Programming Languages

c
50402 projects - #5 most used programming language
shell
77523 projects

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
Gvcci
color extraction to turn images into 16 color palettes
Stars: ✭ 86 (-18.1%)
Mutual labels:  unix
Xnotify
read notifications from stdin and pop them up on the screen
Stars: ✭ 97 (-7.62%)
Mutual labels:  unix
Glob
Glob for C++17
Stars: ✭ 74 (-29.52%)
Mutual labels:  unix
Unix Text Commands
Unix Text Processing Command Reference
Stars: ✭ 78 (-25.71%)
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
Ldap4net
OpenLdap port for DotNet Core (Linux\OSX\Windows)
Stars: ✭ 93 (-11.43%)
Mutual labels:  unix
Trickle
600 baud pipe and terminal.
Stars: ✭ 75 (-28.57%)
Mutual labels:  unix
Coax
A (barely working) native Wire client for Unix
Stars: ✭ 77 (-26.67%)
Mutual labels:  unix
Irccat
cat to IRC
Stars: ✭ 91 (-13.33%)
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
Cups Ipp
CUPS Implementation of IPP - PHP Client API
Stars: ✭ 70 (-33.33%)
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
Autopwn
A simple bash based metasploit automation tool!
Stars: ✭ 99 (-5.71%)
Mutual labels:  unix
Bin
~/bin
Stars: ✭ 93 (-11.43%)
Mutual labels:  unix

Minishell - @42Born2Code

As beautiful as a shell

Quick Demo

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

  1. Download/Clone this repo

     git clone https://github.com/r4meau/minishell
    
  2. cd into the root directory and run make

     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 or Y would have been a better way to do it ;)

Sponsors

Sponsor

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].