Project source can be downloaded from https://github.com/khuan013/rshell.git
Kenneth Huang
All known bugs and fixes can be sent to [email protected]
.:
Makefile
LICENSE
README.md
./src
./tests
/src:
rshell.cpp
/tests:
exec.script
cd
intorshell
directory- Call
make
cd
intobin
- Call
rshell
Rshell runs instead of bash, type exit
to quit the program.
This program was created to be a simple command shell.
It can take in multiple commands using the connectors, &&
||
and ;
.
Uses wait()
, fork()
and execvp()
to call functions.
Parses the input by breaking it up into a string vector, and then determines which elements should be sent to execvp.
Connectors work based on the most recent command. If the command before an && did not succeed, no further commands will be executed. If a command before an || does succeed, no further commands will be executed.
Also displays the user and hostname of the machine the user is logged into.
- When running the program in a script on local machine, the getlogin() function causes an error.
- Does not handle comments # in quotations marks when using echo.
- Typing an odd number of
&
or|
characters will cause a seg fault. (fixed)