c programming project (Command Language Interpreter)

  • Status Completed
  • Budget $30 - $250 AUD
  • Total Bids 2

Project Description

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 :


get input line

if end of input exit

break line into words

found := false

if command is builtin


do_builtin ( line )

found := true


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.


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.

Get free quotes for a project like this
Completed by:
Skills Required

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online