Giter Site home page Giter Site logo

small_shell's Introduction

Small Shell

My implementation of linux shell in C, refer to the guide for detailed description of functions and usage.

  • Handles variable assignment and expansion
  • Piping of commands ( | )
  • Only Output redirection ( > and >> ) is supported for now.
  • Catches SIGINT and prevents interruption.
  • Inbuild commands are
    • cd   Change Current Directory
    • showvar   Print shell variables
    • showenv   Print environment varaibles
    • export   Export variable to environment scope
    • unset   Remove varaible from environment scope
    • pushd   Add directory node to top od directory stack
    • popd   Remove directory node from stack
    • dirs   Print directory stack
    • source   Execute commands from script file
    • exit   Exit the shell

To compile you need the readline package , run the following command in terminal to install the package, ignore if already installed.

sudo apt-get install libreadline8 libreadline-dev

The readline library provides line auto-completion and suggestion with history functionality.

To compile using gcc and execute run the following command.

make all; ./shell 

Exit the shell by typing exit or quit .

small_shell's People

Contributors

shackleb0lt avatar

Stargazers

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