Coder Social home page Coder Social logo

minishell's Introduction

minishell

In the 42 project, we are redeveloping our own version of a compact bash. It's a program designed to interpret prompts and initiate executables with arguments, incorporating several built-in functionalities.

minishell_demo.mov

How to use it

Using make will create the minishell executable. Simply run it with :

make && ./minishell

Available options

Minishell can execute programs using either absolute paths, relative paths, or paths found in the environment (like /bin/ls or simply ls), and this includes passing arguments or options. Single (' ') and double quotes (" ") function identically to bash, except they do not support commands spread over multiple lines.

the shell supports using redirections (>, >>, <, <<) and pipes (|).

It also manages environment variables, such as $HOME, and captures the return status code $?.

Additionally, Minishell responds to Ctrl-C for interruption, Ctrl-\ for quitting a program, and Ctrl-D to input an EOF, all in the same manner as bash.

Several functionalities are "built-in", which means they are reimplemented within Minishell rather than invoking external executables. These include commands like echo, pwd, cd, env, export, unset, and exit.

Version

Apple clang version 11.0.0 (clang-1100.0.33.17)

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.