- Displaying username and hostname and the current directory is the home directory.
- Implement cd as given in the assignemet.
- echo and pwd are implemented .Extra spaces and tabs are handeled.
- ls command with -a and -l flag is implemented.
- Foreground and background processes are handeled. Built-in commands except ls, echo,cd, pwd, pinfo are handeled.
- pinfo command prints the process-related info of your shell program. pinfo <.pid> is also handeled.
- Finished Background Processes are handeled and if the background process exits then the shell displays the appropriate message to the user.
- Repeat is implemented.
- history and history num is implemented.
- Made a file called redirt.c in it according to the redirection changing my input and output file and then sending it to other commands which execute normally but uses the new input and output file to read and write.
- To handle piping I made pipe.c file which checks if piping is requiered and then in every command I use the new input and output file to read and write by using dup and dup2.
- I/O Redirection within Command Pipelines is handeled.
- I implemented jobs which will print all the running and stopped jobs along with their pid.
- I implemented sig which sends the signal corresponding to signal number to that process(running process) {I used kill to execute it}.
- I implemented fg which brings the running or stopped background job corresponding to job number to the foreground, and changes its state to running I used signal to implement it.
- All user defined commands are in jobs.c file.
- I implemented Ctrl + D and Ctrl + C as specified in the assignment pdf.
- Global variables are defined in headers.h file.
- Username and hostname are displayed by prompt.h.
- In main.c the main while loop is running.
- On giving exit as an input you will exit from the shell.
- MAKEFILE IS MADE FOR COMPILING ALL THE CODES WHICH IS STORED IN DIRECTORY OF SHELL CODES. SO TO COMPILE CODE JUST GO TO THE WORKING DIRECTORY OF SHELL CODES AND WRITE "make" COMMAND IN THE TERMINAL.
- After compiling type ./a.out to execute.