Unix Programming Using PIPES()

FUNCTIONAL SPECIFICATION The program requires writing a minimal shell that will execute a single pipeline of processes. Synopsis: msh It shall output a prompt string, such as: msh> It shall read a single command line, which consists of a single command or a pipeline of commands. Example: "cmd1 | cmd2 | ... | cmdn"> filename It need not interpret or expand shell metacharacters. (No processing of metacharacters is required.) It must handle output redirection. (It need not handle input redirection; only output redirection is required.) It shall parse the commands and their arguments so that each command of the pipeline is in a form to be executed by an exec call. It shall create a process to execute each command in the pipeline. It shall establish pipes as specified in the command line entered after the prompt. It shall exec the commands on the processes. On completion of the execution of the pipeline, it shall reissue the prompt. It shall terminate on the input of quit . NOTES Each command should be executed by using an execvp(argv[0], argv) call, where argv is an array of pointers to the arguments of an individual command. When setting up your argument lists, you may use calloc (or malloc ) to assign space for pointers. Alternatively, you may use a fixed array that can handle 12 processes (in case of which you should check the prescribed limits). (In fact, how you do it is not mandated.) Each command in the line should be executed in its own process. Your program should set up these processes, as well as all pipes called for in the line's argument list. Use a wait call in the parent process to receive death of all child signals. TESTING Use the following pipeline to test your program cat .cshrc | tr -sc A-Za-z '\012' | sort | uniq -c | sort -n | tail > [url removed, login to view] NOTES Test the pipeline on your shell before you start working on your program.

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased.

## Platform


Evner: C programmering, Ingeniørarbejde, Linux, MySQL, PHP, Software Arkitektur, Software Testning, UNIX

Se mere: unix programming pipes, writing programming in c++, writing a to z, writing a check example, where to start programming, string programming, string processing in c, string in c programming, string c programming, start programming, start php programming, sort array c, software testing space, software testing how to start, programming using c++, programming using c#, programming process, programming pointers, programming array, pointers in c programming

Om arbejdsgiveren:
( 0 bedømmelser ) Canada

Projekt ID: #2914701