University project where we add to reproduce a shell (mini) in the context of System programming. So in this context the lexical analysis and tree building were given. I did not write the lex and yacc code.
To build the project make, yacc and lex are needed, If not installed on your machine you should install those. Then just run the Makefile
make
Then you can run the executable
./Shell
You can clean the directory with
clean
Some internal commands are implemented:
echo
cd
source
exit
true
false
It is possible to execute simple commands ls -a
- Evaluation of simple sequences.
ls -al; cat -n file
- Evaluation of && sequences.
ls && echo success
- Evaluation of || sequences.
ls || echo fail
It is possible to combine all those types of commands
- standard output
>
- standard input
<
- error outpout
2>
- error and standard output
&>
- standard output append
>>
It is possible to combine all those redirections togethers
Evaluation of pipelines (ls | grep log)
With &
it is possible to execute a command in the background. xeyes &
zombies process are dealed with signal process