Simple Shell
Simple Shell is a project for the ALX Software Engineering program, aiming to create a basic replica of the Unix shell. It provides a command-line interface where users can interact with the operating system by executing commands.
This Simple Shell implementation supports the execution of both built-in commands and external commands available in the system's PATH. It provides features such as command execution, handling command-line arguments, environment variable expansion, and more.
Features
- Executes built-in commands such as
cd,env,setenv,unsetenv,alias, andexit. - Executes external commands available in the system's
PATH. - Supports command-line arguments, allowing users to pass arguments to commands.
- Handles environment variable expansion, allowing users to reference and expand variables in command arguments.
- Provides a basic prompt for input and command execution.
- Handles signals such as
Ctrl+Cto interrupt command execution. - Provides error handling and informative error messages.
Getting Started
To get started with the Simple Shell project, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/simple-shell.git. - Compile the source code using a C compiler:
gcc -Wall -Werror -Wextra -pedantic *.c -o shell. - Run the shell:
./shell.
Usage
The Simple Shell provides a command-line interface where you can enter commands. Here are some examples:
-
Execute a command:
$ ls -l
-
Execute a built-in command:
$ cd directory/
-
Use command-line arguments:
$ echo Hello, World!
-
Use environment variable expansion:
$ echo $HOME
Contributing
Contributions to the Simple Shell project are welcome! If you'd like to contribute, please follow these guidelines:
- Fork the repository and create a new branch.
- Make your changes, following the project's coding style and guidelines.
- Write tests for your changes, ensuring proper functionality.
- Submit a pull request, explaining the changes you've made.
Contact
For questions, feedback, or suggestions, feel free to contact the project maintainers:
- Mohammed Ahmed - ma2286572@gmail.com
- Obada Abdalbadee - Obadabadee3@hotmail.com