C Programming

Completed Posted Mar 22, 2015 Paid on delivery
Completed Paid on delivery

Your first task will be to write a program that repeatedly reads a line of input from the

user, the fgets() function (see Sect. 5 for usage information of all system provided

functions) will help you here. Your program should end when either end of the input

file is encountered, or the exact word exit appears in the input as the only word on a

line.

Your next task will be to break the line up into words, which are separated by one or

more spaces. The provided function tokenize() does this, and it uses strtok()

internally. You may use this function if you wish, in which case you should provide

documentation on its operation, or you may write your own parser.

You should next implement the find_and_execute() section of the logic

above, by creating a new process using fork(), and then use one of the exec()

family of functions to run the program requested by the user in the text provided. If

1

he requested program cannot be run then an appropriate error message should be displayed,

perror() will help with this (as there are many reasons why this may fail),

and the child process terminated.

The CLI process must pause until the created process is concluded, wait() will

need to be used here. Once the new process has finished you must decode and print out

the exit status of that process.

Once this works you should add a builtin function cd to change the working directory

of the CLI. This builtin should always use the next word supplied as the directory

to change to, failure to supply a destination should be treated as an error. The chdir()

function will be vital here

C Programming

Project ID: #7349743

About the project

4 proposals Remote project Active Mar 22, 2015

Awarded to:

vano101

A proposal has not yet been provided

$35 USD in 2 days
(504 Reviews)
6.6

4 freelancers are bidding on average $116 for this job

cscinstructor

I have read and fully understood your requirements. Please open chat to discuss further….. =================+++++++++++++++++++++++++======================

$233 USD in 7 days
(2 Reviews)
2.2
ithuang2014

hello. I saw your description and attached files. I understand it and can do it . I have done several project like this. I'm an expert in Data Mining, Data Structures and Algorithms. And I know Java and C/C++ well More

$100 USD in 3 days
(7 Reviews)
1.8
tzzcl

一个有效的提议尚未被提供

$30 USD in 1 day
(1 Review)
1.4
manursareena

I am C programmer with 7 years of industrial experience in kernel programming. I am currently a researcher in high performance algorithms for medical image analysis using C/C++.

$166 USD in 4 days
(0 Reviews)
0.0