A simple Linux-like shell implemented in C. This project demonstrates command parsing, built-in commands, variable management, and I/O handling.
- Custom shell prompt
- Built-in commands (e.g.,
cd,exit) - Command execution
- Variable management
- Input/output helpers
- GCC (GNU Compiler Collection)
- Make
- (Optional) AddressSanitizer for debugging
- Open a terminal and navigate to the
srcdirectory:cd src - Build the shell using
make:This will produce themake
myshexecutable.
After building, run the shell with:
./myshmysh.c: Main entry point for the shellbuiltins.c/h: Built-in command implementationscommands.c/h: Command parsing and executionio_helpers.c/h: Input/output helper functionsvariables.c/h: Shell variable managementMakefile: Build instructions
To remove compiled files and the executable, run:
make clean