All Projects → nickdotht → minishell

nickdotht / minishell

Licence: MIT license
As beautiful as a shell

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to minishell

ft select
A robust file browser and manager in the terminal.
Stars: ✭ 14 (-88.71%)
Mutual labels:  unix, school-project
tush
No description or website provided.
Stars: ✭ 23 (-81.45%)
Mutual labels:  unix
bac-genomics-scripts
Collection of scripts for bacterial genomics
Stars: ✭ 39 (-68.55%)
Mutual labels:  unix
smooth
The smooth Class Library
Stars: ✭ 23 (-81.45%)
Mutual labels:  unix
rust-font-loader
A font loading utility written in rust.
Stars: ✭ 44 (-64.52%)
Mutual labels:  unix
.config
⚙️ Bootstrappable user environment for macOS & Ubuntu
Stars: ✭ 31 (-75%)
Mutual labels:  unix
godzilla
a powerful go web framework
Stars: ✭ 22 (-82.26%)
Mutual labels:  unix
libconfini
Yet another INI parser
Stars: ✭ 106 (-14.52%)
Mutual labels:  unix
awesome-programming-books
List of good programming books for beginners and professionals
Stars: ✭ 68 (-45.16%)
Mutual labels:  unix
onionjuggler
Manage your Onion Services via CLI or TUI on Unix-like operating system with a POSIX compliant shell.
Stars: ✭ 31 (-75%)
Mutual labels:  unix
InitWare
The InitWare Suite of Middleware allows you to manage services and system resources as logical entities called units. Its main component is a service management ("init") system.
Stars: ✭ 164 (+32.26%)
Mutual labels:  unix
hosts
A command line hosts file editor in one portable script.
Stars: ✭ 145 (+16.94%)
Mutual labels:  unix
subhook.nim
subhook wrapper for Nim https://github.com/Zeex/subhook
Stars: ✭ 15 (-87.9%)
Mutual labels:  unix
AiliceOS
AiliceOS: Build an x86_64 and UEFI OS using Rust
Stars: ✭ 59 (-52.42%)
Mutual labels:  unix
ncurses guide
NCurses Examples from the book "Programmer's Guide to NCurses" with improvements and fixes
Stars: ✭ 43 (-65.32%)
Mutual labels:  unix
HyperGraphLib
C++ Hypergraph modelling Library using Boost and OpenMP with some algorithms, including isomorphism using Gecode.
Stars: ✭ 19 (-84.68%)
Mutual labels:  school-project
xmlrpc-bruteforcer
An XMLRPC brute forcer targeting Wordpress written in Python 3. (DISCONTINUED)
Stars: ✭ 62 (-50%)
Mutual labels:  unix
bonomen
BONOMEN - Hunt for Malware Critical Process Impersonation
Stars: ✭ 42 (-66.13%)
Mutual labels:  unix
InitKit
Neo-InitWare is a modular, cross-platform reimplementation of the systemd init system. It is experimental.
Stars: ✭ 364 (+193.55%)
Mutual labels:  unix
GLPT
GLPT :: OpenGL Pascal Toolkit. A multi-platform library for OpenGL and OpenGL ES
Stars: ✭ 26 (-79.03%)
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].