The Simple Shell project is an implementation of a simple UNIX command-line interpreter written in C. This project is designed to provide an understanding of how a shell works, including parsing commands, handling built-in functions, and executing programs.
- Command execution: Executes commands found in the system's PATH.
- Built-in commands: Includes basic built-in commands like
cd
,exit
, etc. - Command parsing: Handles command-line arguments, including quotes and escape sequences.
- Error handling: Provides basic error messages for common issues.
- Environment variables: Supports environment variables.
To install and run the Simple Shell, follow these steps:
- Clone the repository:
git clone https://github.com/Younis-Ahmed/simple_shell.git
- Navigate to the project directory:
cd simple_shell
- Compile the shell:
gcc -Wall -Werror -Wextra -pedantic *.c -o hsh
- Run the shell:
./hsh
Once the shell is running, you can execute commands just like in a standard UNIX shell. Here are a few examples:
- Running a command:
$ ls -l
- Changing directory:
$ cd /path/to/directory
- Exiting the shell:
$ exit
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
- Make your changes and commit them:
git commit -m "Description of changes"
- Push to the branch:
git push origin feature-branch
- Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
Here are some recent commits to the project:
- Update README.md
- Add hsh to .gitignore
- Add README.md file with shell instructions and notes
- Add main.h header file
- Add main.c file with initial code