Em Andamento

C Program for UNIX

In this assignment you are required to develop a program that will act as a simple shell, similar to the bash shell in UNIX. Your shell must perform the following:

Display a prompt, e.g., my_shell$

Accept a command entered by the user by using *fgets()* (**do not use** *gets()*)

Execute the command by invoking the *fork()* and *execvp()* system call

If the command cannot be executed, display the appropriate system error message (use *perror()* for this purpose)

If logout is typed, the shell should exit

Extend the shell to allow a process to redirect *stdout* to the *stdin* of a second process. That is, implement a pipe. Use the standard pipe operator "|". For example, as mentioned above, the command "sort filename" will alphabetically sort each line of a text file, and write the sorted output to stdout. However, "sort filename | head" will alphabetically sort each line of the text file, and write the sorted output into a pipe using *stdout*.

Again extend the shell to support invoking a command in either foreground or background mode. The user should be able to run a command in the background by placing an extra "&" at the end of the command line, e.g., "sleep 1000 &" to manage whether a command is running in the foreground or background, you must use the *wait()* system call (**do not use** *waitpid()*). The shell should also support multiple background jobs up to a maximum of 10. The command “jobs?? should be implemented to display the currently executing background processes PID numbers and the command line from which it was invoked.

All the above mentioned should be in one program.

## Deliverables

1) Complete and fully-functional working program in executable form as well as complete source code of all work done.

2) Complete ownership and distribution copyrights to all work purchased.

## Platform

The program must run on Linux.

Habilidades: Programação C, Programação C#, Engenharia, Linux, MySQL, PHP, Arquitetura de software, Teste de Software, UNIX

Ver mais: unix jobs, sleep programming, shell jobs, programming program, programming head, platform programming jobs, pid programming, linux shell programming, jobs programming, jobs act, gets programming, fgets programming, programming operator, programming fgets, programming example, program jobs, command line programming, act jobs, shell bash, functional programming jobs, bash shell programming, bash programming, bash file, program line, unix

Acerca do Empregador:
( 2 comentários ) Singapore

ID do Projeto: #2970539

Premiar a:

aoavw

See private message.

$6 USD em 3 dias
(8 Avaliações)
1.8

5 freelancers estão ofertando em média $15 para este trabalho

barreiro04

See private message.

$17 USD in 3 dias
(22 Comentários)
3.7
agranig

See private message.

$12.75 USD in 3 dias
(5 Comentários)
3.8
fireye

See private message.

$21.25 USD in 3 dias
(8 Comentários)
3.1
laurencewithers

See private message.

$17 USD in 3 dias
(4 Comentários)
2.4