Giter VIP home page Giter VIP logo

c-shell's Introduction

C-Shell

C-Shell is a simple Unix-like shell implementation written in C.

Features

  • Command execution: Execute external commands and built-in commands.
  • Built-in commands: Supports built-in commands such as cd, mkdir, cat, help, and exit.
  • Input/output redirection: Supports input/output redirection using < and > operators.
  • Signal handling: Gracefully handles signals such as SIGINT (Ctrl+C) and SIGTERM.
  • Colorful prompt: Displays a colorful prompt to enhance user experience.

How to Use

  1. Run the shell using the provided run.sh script:
./run.sh
  1. You will see the C-Shell prompt (>). You can type commands and press Enter to execute them.

Built-in Commands

  • cd: Change directory.
  • mkdir: Create a directory.
  • cat: Display the contents of a file.
  • help: Display information about the shell and built-in commands.
  • exit: Exit the shell.

Input/Output Redirection

C-Shell supports input/output redirection using the < and > operators. For example:

cat  input.txt > output.txt

Signal Handling

C-Shell gracefully handles signals such as SIGINT (Ctrl+C) and SIGTERM. Pressing Ctrl+C will exit the shell.

Acknowledgements

A big thank you to Stephen Brennan for his comprehensive guide on writing a shell in C, which served as a valuable resource and reference for this project.

c-shell's People

Contributors

kernel-rb 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.