Giter Site home page Giter Site logo

minishell's Introduction

Minishell

Minishell is the 8th project at 42. It tasks us to create a 'simple' shell. Yes, your little bash or zsh.

Demo

What is a shell?

Put simply, a shell is the outermost layer of communication between the user and operating system. Allowing us to navigate and execute tasks in human-readable language. If it breaks, you cannot talk anymore so it must be pretty reliable!

As part of the project we have implemented many features that are staple to linux shells. Those include running executables from absolute or relative path, like /usr/bin/ls or ls, which are fetched from the environment PATH. It handles pipe redirection with as many commands as needed. It supports usage of quotes and single quotes -- including nested ones -- and environment variable expansion. It handles specific signals like Ctrl-C Ctrl-\ and Ctrl-D to quit the program, in the same way as bash.

A few of the functions are "built-in", meaning we don't call the executable, but rather our own functions from inside the shell itself. It's the case for echo, pwd, cd, env, export, unset and exit. As part of the bonus, the operators &&, || and the wildcard * are supported. We have also implemented extra functionality, zsh-like redirection that handles multiple files both as input or output.

Application flow

We have created a schematic before beggining the project and updated it after completion. It shows you the broad strokes of the program and the files where you can find each feature.

Click here for the interactive link.

What we learned

This is the first project in 42's cursus where we need to work in a group, getting closer to a real life professional experience. Throughout these 45 days we have learned much about unix, how to plan a project in advance, split tasks in a way that work can be done simultaneously in multiple sections, descriptive documentation, more specialized git tools, automated testing and much more!

Badge

Our grade

Getting started

Follow the steps below

# Requirements: GNU Readline Library
# To install the readline library, open the terminal window and write
sudo apt-get install libreadline-dev

# Clone the project and access the folder
git clone --recurse-submodules https://github.com/VLN37/Minishell.git && cd Minishell/

# Compilet the program with
make

# Run the program
./minishell

# Write any shell command like
echo "hello minishell"

# Quit the program
exit

# Clean output objects with
make fclean

# Well done!

Updating

The project is regularly updated with bug fixes and code optimization.

๐Ÿ“ License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.


Made by: Joรฃo Rodriguez ๐Ÿ‘‹ See my Github Welton Leite ๐Ÿ‘‹ See my linkedin

minishell's People

Contributors

vln37 avatar wwwwelton avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.