C-Shell is a simple Unix-like shell implementation written in C.
- Command execution: Execute external commands and built-in commands.
- Built-in commands: Supports built-in commands such as
cd
,mkdir
,cat
,help
, andexit
. - Input/output redirection: Supports input/output redirection using
<
and>
operators. - Signal handling: Gracefully handles signals such as SIGINT (Ctrl+C) and SIGTERM.
- Colorful prompt: Displays a colorful prompt to enhance user experience.
- Run the shell using the provided
run.sh
script:
./run.sh
- You will see the C-Shell prompt (
>
). You can type commands and press Enter to execute them.
cd
: Change directory.mkdir
: Create a directory.cat
: Display the contents of a file.help
: Display information about the shell and built-in commands.exit
: Exit the shell.
C-Shell supports input/output redirection using the <
and >
operators. For example:
cat input.txt > output.txt
C-Shell gracefully handles signals such as SIGINT (Ctrl+C) and SIGTERM. Pressing Ctrl+C will exit the shell.
A big thank you to Stephen Brennan for his comprehensive guide on writing a shell in C, which served as a valuable resource and reference for this project.