Skip to content

MaryEhb/simple_shell

Repository files navigation

Simple Shell

This is a basic Unix shell implemented in C, designed for simple command execution. It follows strict criteria outlined below:

Features

  • 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.

Getting Started

  1. Clone the Repository:
git clone https://github.com/yourusername/simple-unix-shell.git
  1. Compile the Code:
cd simple-unix-shell
gcc shell.c -o shell
  1. Run the Shell:
./shell

Contributors

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published