Giter Club home page Giter Club logo

minishell's Introduction

Minishell

Minishell is a simple UNIX command-line shell developed as part of the curriculum at 42 Abu Dhabi. It provides a basic shell environment with support for various built-in commands, as well as the ability to execute external commands, handle pipes, and perform input/output redirection.

Table of Contents

Features

  • Supports a variety of built-in shell commands.
  • Ability to execute external commands.
  • Handles input and output redirection.
  • Supports piping of commands.
  • Implements signal handling for Ctrl+C (SIGINT), Ctrl+\ (SIGQUIT) and Ctrl+D (EOF).
  • User-friendly and interactive command-line interface.

Getting Started

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Linux/Unix Environment: Minishell is designed to run on Unix-like systems.

Installation

  1. Clone the repository:

    git clone https://github.com/Degef/Minishell.git
    
  2. Make

     cd Minishell
     make
    

Usage

To start using Minishell, simply run the minishell executable: ```sh ./minishell

Built-in Commands

Minishell supports several built-in commands:

  • echo: Display messages.
  • cd: Change the current directory.
  • exit: Exit the shell.
  • export: Set environment variables.
  • unset: Unset environment variables.
  • pwd: Print the current working directory.
  • env: Display the environment variables.

External Commands

You can also execute external commands by entering their names and argument if needed at the shell prompt.

Pipes and Redirection

Minishell supports pipes and input/output redirection. You can use | for pipes, < for input redirection, and > for output redirection.

Example: ```sh ls -la | grep myfile.txt

Signals

Minishell handles signals gracefully, including the following:

  • Ctrl+C (SIGINT): Used to interrupt a running command.
  • Ctrl+D (EOF): Signals the end of input.
  • Ctrl+\ (SIGQUIT): Triggers a core dump and can be used to exit the shell with a core dump.

Feel free to explore these signals while using Minishell.

Contributors

This project was done by me (Degef) and Merhawi as part of our curriculum at 42 Abu Dhabi. ...

minishell's People

Contributors

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