Skip to content

MarvinRoopchan/My-Shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

My Shell (mysh)

A simple Linux-like shell implemented in C. This project demonstrates command parsing, built-in commands, variable management, and I/O handling.

Features

  • Custom shell prompt
  • Built-in commands (e.g., cd, exit)
  • Command execution
  • Variable management
  • Input/output helpers

Getting Started

Prerequisites

  • GCC (GNU Compiler Collection)
  • Make
  • (Optional) AddressSanitizer for debugging

Build Instructions

  1. Open a terminal and navigate to the src directory:
    cd src
  2. Build the shell using make:
    make
    This will produce the mysh executable.

Running the Shell

After building, run the shell with:

./mysh

Project Structure

  • mysh.c : Main entry point for the shell
  • builtins.c/h : Built-in command implementations
  • commands.c/h : Command parsing and execution
  • io_helpers.c/h : Input/output helper functions
  • variables.c/h : Shell variable management
  • Makefile : Build instructions

Cleaning Up

To remove compiled files and the executable, run:

make clean

About

A fully functional shell that seeks user input complete with a command line interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published