This is my simple shell build through a project. This shell is written in C language.
function
- execute command whose binary file is located in $PATH
- shell build in command
- cd
- exit
- pipe
- redirect
make
- start the shell
./xs_shell
- list directory
$ ls
- change directory
$ cd ..
$ cd ~
$ cd /
- execute cat command
$: cat $(path to file)
- redirect
$ cat < $(some file) | grep
$ ls > $(file to store the output of ls)
$ ls >> $(file to store(append) the output of ls)
- pipe
$ ls | cat | wc -l
sorry, "(", ")" are not working
- quit
$ exit
or just press Ctrl + D