This is an implementation of a basic interactive shell done in C as an assignment for our Operating Systems course.
- Download the repository as a zip, or clone it.
cd
into directory - Run
make install
. Ignore any warnings shown. - Run
./shell
In order to exit the shell, type exit
-
Display requirement
username@systemname:path/to/whereever $
-
Builtins.
echo
,cd
,pwd
. Don't use execvp. -
Make an
ls
functionality. Options to enable: -l, -a, -al/la -
Option to execute system command, like the ones in /bin/. Implement foreground, background processes. Should have arguments.
-
pinfo. Prints information related to the running shell program process.
pinfo pid
should print the process related information about the process with pid. -
Print correct information about the background process exiting safely.
-
Implement a 'remind me' functionality (optional)
-
Add a clock (optional)
- Implement foreground and background processes properly
- Input/Output redirection
- Command redirection with pipes
- I/O + pipe redirection
- Implement
setenv
,getenv
,jobs
,kjob
,fg
,bg
,overkill
,quit
,^Z
,^C
- Display
-
cd
,pwd
,exit
-
echo
- ls
- Execute processes
- Background process (no job)
- pinfo
- Process exit notification
- Reminder
- Clock
- Proper FG/BG
- I/O Redirection
- Command Redirection, pipes
- I/O+pipes
- setenv, getenv
- jobs, kjo, overkill
- fg, bg, ^Z
- quit, ^C
- Usage of
system
is strictly prohibited. - Get error handling right
- rollnum_assgn2.tar.gz
An overview of how I think it'll function.
- An REPL
- Display prompt
- Line input
- Command processing
- Command execution
- along with error handling