c programming project (Command Language Interpreter)

Closed

See attached file, a brief snippet of the task is below:

A Command Language Interpreter (CLI) accepts input from the user, and exe-

cutes the commands issued. The logic of the CLI is given below:

main :

loop

get input line

if end of input exit

break line into words

found := false

if command is builtin

then

do_builtin ( line )

found := true

else

found := find_and_execute ( line )

end if

if not found report error

end loop

Your rst task will be to write a program that repeatedly reads a line of input

from the user, the fgets() function will help you here. Your program should

end when either end of le is encountered, or the word exit appears in the

input as the rst word of a line.

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

by one or more spaces. strtok() may help you with this task.

You should then create a new process using fork(), and then use one of

the exec() family of functions to run the program requested. The CLI process

must pause until the created process is concluded, wait() will need to be used

here. Once the new process has nished you must print out the exit status of

that process.

1

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

directory of the CLI. The chdir() function will be vital here.

Skills: C Programming

See more: command language interpreter, up programming, the c# programming language, the c programming language, the c programming, see programming, report programming, programming words, programming with c language, programming project help, programming process, programming loop, Programming Logic, programming functions, programming function, programming error, programming change, or in c programming, new programming language, need to write a programming language, need interpreter, loop programming, logic programming language, language programming, interpreter programming

Project ID: #1601243

Awarded to:

pivn

I read your assignment and it's not difficult with me. I can do it very well. Ready to start this project. Please send it to me and we start.

$100 AUD in 2 days
(10 Reviews)
3.9

2 freelancers are bidding on average $125 for this job

ciachn

Hello, I can help you with your project.

$150 AUD in 2 days
(7 Reviews)
3.8