- Anirudh Singh (2019A7PS0107P)
- Dhruv Rawat (2019B3A70537P)
Implement a command-line interpreter or shell. The shell takes in a command from user at its prompt and executes it and then prompts for more input from user.
- Shell should execute a command using
fork()
andexecve()
calls. It should not use temporary files,popen()
, orsystem()
calls. It should not usesh
orbash
shells to execute a command. Once the command is completed it should print itspid
andstatus
. - Shell should support <, >, and >> redirection operators.
- Shell should support pipelining any number of commands. E.g.:
ls|wc|wc
orcat x|grep pat|uniq|sort
- Shell should support two new pipeline operators "||" and "|||". E.g.:
ls -l || grep ^-, grep ^d
. It means that output ofls -l
command is passed as input to two other commands. Similarly "|||" means, output of one command is passed as input to three other commands separated by ",". - Implement any other important feature not covered in 1 to 4 and available in contemporary shells.
Write a program called shell.c
that implements the above requirements.
- shell.c
pdf
explaining the design features for 1 to 4 and features selected for 5
Consider the requirement for a chat server which enables multiple users to send messages to each other. The communication between server and clients will be through TCP sockets. Server should use message queues for IPC. It should not use temporary files or database to store data. Server can be tested using telnet
command.
- A user should be able to join or leave the chat system.
- A user should be able to get the list of users with the status (whether online or not).
- A user should be able to send messages to any or all either online or offline.
- Server should create a new process for every client connection and use message queues for communicating among the children processes.
- Implement any other important feature not covered in 1 to 4 but available in chat apps
Write a program called chat.c
that implements the above requirements.
- chat.c
pdf
explaining the design features for 1 to 4 and feature selected for 5