A custom Unix shell implementation built from scratch in C as part of the CodeCrafters challenge.
-
Built-in Commands
exit- Terminate the shellecho- Print text to stdouttype- Display command type information (builtin vs external)
-
External Command Execution
- PATH resolution for executable lookup
- Process forking and execution via
fork()andexecv() - Child process management with
waitpid()
-
Command Discovery
- Searches
$PATHenvironment variable for executables - Validates file permissions before execution
- Searches
- Written in C23
- Uses POSIX system calls (
fork,execv,waitpid) - Implements custom PATH traversal algorithm
- Handles process lifecycle management
./your_program.sh #Build and run the shellShe sells seashells by the seashore