Giter VIP home page Giter VIP logo

minishell's Introduction

Project Title

C Minishell

Description

This program, aka "mush" (The Minimally Useful SHell) is a simple shell which has nowhere near the functionality of a full-blown shell like /bin/sh or /bin/csh, but it is fairly powerful for its size and has most features that one would want in a shell, including:

  • Both interactive and batch processing. If mush is run with no argument it reads commands from stdin until an end of file (^D) is typed. If mush is run with an argument, e.g. “mush foofile,” it will read its commands from foofile. This must not be accomplished by duping the file to stdin. It is important to retain the original standard input for executed pipelines, otherwise a script starting with the line cat would proceed to cat the rest of the script.
  • Support for redirection. mush supports redirection of standard in (<) and standard out (>) from or into files. mush also supports pipes (|) to connect the standard output of one command to the standard input of the following one.
  • Support for quoted strings. mush supports double quotes to allow arguments with embedded spaces.
  • Support for backslash escapes. mush supports the use of backslash (‘\‘) to cause the following character to be taken literally.
  • A built-in cd command. Recall that cd cannot be run as a child process because it would change the child’s working directory, not the parent’s.
  • Support for SIGINT. When the interrupt character (ˆC) is typed, mush catches the resulting SIGINT and responds appropriately. SIGINT does not need to be forwarded to children — the tty driver will take care of that — but after the signal, the shell should not die. Rather it should wait for any running children to terminate and reset itself to a sane state.

Getting Started

Dependencies

GCC Compiler

Installing

  • This program can be downloaded in its entirety from this repository.

Executing program

  • Execute the included makefile
make
  • Run the output of said makefile
./mush.out

Help

For help or feedback email [email protected].

Authors

@maxchristy

Version History

  • 0.1
    • Initial Release

Acknowledgments

Course from which material was assigned

  • Professor Phillip Nico

minishell's People

Contributors

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