kevinkarnani / CShell

My implementation of a Bash Shell in C.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CShell

Introduction

This is a refactored version of a shell I wrote for my Systems Programming class.

Getting Started

Prerequisites

You must have gcc or some form of C compiler installed in order to run this code.

Functionality

It supports:

  • Certain Bash Built-in Commands (cd and exit)
  • Redirection (<, >, >>)
  • Piping (|)
  • Backgrounding (&)
  • Chaining
    • Consecutive (;)
    • Simultaneous (&)

Additional features, such as Regex and conditionals, are planned.

An example command:

wc < shell.c > test.txt & ls | wc | egrep 0; sleep 5&

Compilation

After downloading the file, run:

gcc -g -o shell shell.c # -g only necessary if debugging with gdb

Running The Shell

After compiling the code, run:

./shell

Author

Kevin Karnani

About

My implementation of a Bash Shell in C.


Languages

Language:C 100.0%