This is a basic Unix shell implemented in C, designed for simple command execution. It follows strict criteria outlined below:
-
Command Execution: The shell accepts one-word commands with optional arguments.
-
Prompt Display: A prompt is displayed, waiting for the user to enter a command. After execution, the prompt is displayed again.
-
Error Handling: If an executable cannot be found, an error message is displayed, and the prompt reappears.
-
End of File Handling: The shell gracefully handles the "end of file" condition (Ctrl+D).
-
Built-in Commands:
exit
: Allows you to exit the shell.env
: Displays the current environment.
- Clone the Repository:
git clone https://github.com/yourusername/simple-unix-shell.git
- Compile the Code:
cd simple-unix-shell
gcc shell.c -o shell
- Run the Shell:
./shell
This project is licensed under the MIT License. See the LICENSE file for details.
- This project was created to demonstrate a minimalistic Unix shell in C.
- No advanced features like semicolons, pipes, or redirections are supported, keeping the implementation simple and straightforward.