Welcome to rsh
, a simple shell program written in C for UNIX-based systems. rsh
provides basic shell functionalities with built-in commands like cd
, help
, and exit
.
Note: This shell program will not work on Windows systems due to its dependence on Unix system calls and libraries.
rsh
is a minimalistic shell created to help users understand and experiment with shell basics. This project includes essential features and built-in commands, aiming to provide a foundation for further shell development.
- Built-in Commands: Support for essential commands like
cd
,help
, andexit
. - Command Execution: Execute both built-in and external commands.
- Error Handling: Basic error handling for invalid commands and parameters.
To install and use rsh
on your UNIX-based system, follow these steps:
-
Clone the repository:
git clone https://github.com/rushiljalal/rsh.git
-
Navigate to the project directory:
cd rsh
-
Compile the code:
gcc -o rsh rsh.c
-
Run
rsh
:./rsh
Once rsh
is running, you can enter commands at the prompt. rsh
will recognize both built-in and external commands, providing a basic interactive shell experience.
rsh> <command>
rsh
includes the following built-in commands:
-
cd: Change the current directory.
- Usage:
cd <directory>
- Usage:
-
help: Display a list of available built-in commands and their usage.
- Usage:
help
- Usage:
-
exit: Exit the shell.
- Usage:
exit
- Usage:
rsh> cd /home/user
rsh> help
rsh> ls -la
rsh> exit