Welcome to the Shell Program in C! This project aims to provide you with hands-on experience with system calls in Unix environments, processes, multi-processing, and signal handling.
This Shell Program is designed to mimic a basic command-line interface, where users can interact with the system by executing various commands. The program is implemented in C language, utilizing system calls and the execvp function for command execution.
- Command Execution: The shell supports a variety of commands, including cd, echo, export, and others.
- System Calls: The program utilizes system calls for performing various operations, such as creating processes and managing directories.
- Signal Handling: It handles signals such as SIGCHLD for dealing with zombie processes.
- String Manipulation: The program includes functionalities for string manipulation to parse and process user input.
- cd: Change the current directory.
- echo: Display a line of text.
- export: Set environment variables.
- Other commands are executed using the execvp function.
To use the shell, simply compile the program and run the executable. Once the shell is running, you can enter commands and press Enter to execute them.
To get started with the Shell Program:
- Clone the repository to your local machine.
- Compile the source code using a C compiler.
- Run the executable to start the shell.
$ gcc shell.c -o shell
$ ./shell
Thank you for using the Shell Program in C! Happy coding! 🚀