Code Monkey home page Code Monkey logo

grushell's Introduction

GruShell

A shell built in c using threads, pipes, signals, and process groups.

Features:

  • Supports ; seperated commands.
  • Supports upto 3000 arguments to any command.
  • Supports some shell variables like ~ and -
  • Supports some builtin commands -> cd pwd echo.
  • Piping - Supports piping of multiple commands
  • FileRedirection - Supports file redirection. (with piping as well).
  • jobs - Shows all the background jobs that are running or in STOPPED state.
  • kjob JOBNO SIGNAL - send a job a particular signal, essentially jobs must be present in the list given by the 'jobs' command.
  • fg JOBNO - Sends a process from background to foreground, again th process must be listed in 'jobs'.
  • overkill - Kills all the jobs that are in STOPPED state or in RUNNING state.
  • read A B C D - Supports reading of commands from user, ex. 'read A B C' reads 3 strings and assigns them to variables, which can then be used afterwards.
  • echo - Supports spaces in command, ex. echo A B C, prints A B C while, echo $A $B $C prints the values of variables from memory.
  • foreground & background - Supports instances of processes, assigning child processes as group members.
  • Tracking the background processes and notifying the user when it exits.
  • history = Gives all the last commands than were run in the order of execution.
  • ** Handles some signals such as SIGINT, SIGKILL, and does the appropriate job when killed.
  • kill PID - Kills the process with pid = PID
  • exit - Exits the shell peacefully and cleanly. :)

INSTRUCTIONS:

gcc main.c -o GruShell_new or ./GruShell

grushell's People

Contributors

pinkeshbadjatiya avatar

Watchers

 avatar  avatar

Forkers

som-iiitb

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.