Assignment

終了済み 投稿 Feb 23, 2004 着払い
終了済み 着払い

(part a)

PRogram should repeatedly print out a prompt, containing the following information, followed by the character ">".

-the command number of the current command, starting with 1.

-The name of the machine that the user is logged into.

-the current directory

example:

4 jupiter /usr/front

Hint: use getcwd(2), and uname(2)

PRogram should repeatedly print out a prompt , containing the character ">".

(part b)

After printing the prompt, the pgrams should read a line of input from the user. An input line consists of zero or more tokens(a character string), separated by one or more spaces or tab characters(white space), ending with a newline character. The first toekn on the line may be preceded by any amount of white space. Each line will be no more than 128 characters long.

(part c)

Shell must recognize a fixed number of stringers as a built in command. (Otherwise, teh first token should be assumed to be an external command, that is to refer to the name of a file to be executed, such as the utility program e.g. ls External commands are below:

For the core shell requirements you must implement only one built in command:

quit

which stops command processing and terrminates the shell.

(part d)

All commands which are not built in commands are external commands . For external commands, you shell will create a child process, and cause the child process to execute the program indicated by the first token in the command. The subsequent tokens indicate command line arguments to the program. For the core requirements, you are not required to perform path searching. That is , you can assume that the program to be executed is either in the current working directory, or that it is fully qualified (i.e. it starts with a '/' such as "/usr/bin/ls)"

If the last non-blank character in the command is not an ampersand , the shell sshould execute the command and wait for the child process to complete before issuing the next prompt.

External commands must be implemented by using the fork/exec/wait system calls. They may not be implemented by using the system(3C) library function.

## 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) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform

The program needs to run on C++ of course using unix.

PHP

プロジェクトID: #3110014

プロジェクトについて

4個の提案 リモートプロジェクト アクティブ Mar 31, 2004

4人のフリーランサーが、平均$104 で、この仕事に入札しています。

bogdandbs

See private message.

$17 USD 14日以内
(93件のレビュー)
6.0
hunghmvw

See private message.

$127.5 USD 14日以内
(15件のレビュー)
3.9
sayap

See private message.

$102 USD 14日以内
(10件のレビュー)
3.0
powermacstudio

See private message.

$170 USD 14日以内
(7件のレビュー)
1.6