This is a simple Unix shell implemented in C. It supports basic shell functionalities and launching external scripts.
-
Compilation:
clang main.c ./built_in_cmd.c -o simple_shell
-
Execution:
./simple_shell
-
Commands:
- cd: Change directory. Usage:
cd <directory>
- mkdir: Create directory. Usage:
mkdir <directory>
- exit: Exit the shell. Usage:
exit
- ls: List directory contents. Usage:
ls [options] [directory]
- echo: Print arguments to the standard output. Usage:
echo [options] <message>
- mv: Move (rename) files or directories. Usage:
mv [options] <source> <destination>
- touch: Create an empty file or update the timestamp of an existing file. Usage:
touch [options] <file>
- Launching external scripts: You can execute any external script by entering its name. Usage:
<script_name>
- Running Commands in the PATH: You can execute commands located in directories listed in the
PATH
environment variable directly from the shell by entering their names. Usage:<command_name>
- Basic shell functionalities.
- Support for external script execution and commands in the PATH.
- No advanced shell features like piping, redirection, globalling pattern, regular expression, etc.