Skip to content

Latest commit

 

History

History
48 lines (40 loc) · 1.09 KB

File metadata and controls

48 lines (40 loc) · 1.09 KB

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