Shell in C

Completed Posted Mar 15, 2010 Paid on delivery
Completed Paid on delivery

I need a shell (command line interpreter, allowing the user to interact with the OS), written in C, that can perform the following operations:

-cp (copy a file)

-del (deletes a file)

-host (prints the hostname of the machine

-cd (changes directory)

-clr (clears screen)

-dir (lists the contents within the directory)

-environ (lists the environment settings)

-echo <comment> (displays the comment followed by a new line)

-help (displays a help file listing all of the commands that can be used)

-quit (exits the shell)

More information below.

## Deliverables

I need a shell (command line interpreter, allowing the user to interact with the OS), written in C, that can perform the following operations:

-cp (copy a file)

-del (deletes a file)

-host (prints the hostname of the machine

-cd (changes directory)

-clr (clears screen)

-dir (lists the contents within the directory)

-environ (lists the environment settings)

-echo <comment> (displays the comment followed by a new line)

-help (displays a help file listing all of the commands that can be used)

-quit (exits the shell)

It should be called "myshell"

All programming should be in C, the commands should be programmed in C and they can't just call pre-compiled code.

For example, I DON'T want this:

host()

{

system("hostname");

exit(0);

}

But I DO want something like this:

(this is an echo command, found it on wikipedia)

int echo(int argc, char *argv[])

{

int i;

for (i = 1; i < argc; i++)

printf("%s%s", argv[i], (i < argc-1) ? " " : "");

printf("\n");

return 0;

}

The shell must be able to take its commands from a batch file, i.e., myshell batchfile. The batch file will contain a set of commands supported by the shell.

In the case of shell executed without a command line the shell must be able to interact with the user through the command line prompt.

All other command line input is interpreted as program invocation that should be done by the shell forking and execing the programs as its own child processes.

All code should be well notated so that I can see what each bit of code does (I want to understand the language)

C Programming Chrome OS Engineering Linux Mac OS MySQL PHP Project Management Software Architecture Software Testing UNIX Windows Desktop

Project ID: #3261632

About the project

26 proposals Remote project Active Mar 15, 2010

Awarded to:

mz41

See private message.

$38.25 USD in 4 days
(29 Reviews)
4.1

26 freelancers are bidding on average $31 for this job

alexpast

See private message.

$38.25 USD in 4 days
(33 Reviews)
5.5
vw6868760vw

See private message.

$38.25 USD in 4 days
(52 Reviews)
5.5
Vicul

See private message.

$38.02 USD in 4 days
(17 Reviews)
4.9
bitsensesof

See private message.

$38.25 USD in 4 days
(33 Reviews)
4.2
etaigur

See private message.

$21.25 USD in 4 days
(18 Reviews)
4.3
StrongDecs

See private message.

$17 USD in 4 days
(30 Reviews)
4.8
vw7039544vw

See private message.

$38.25 USD in 4 days
(8 Reviews)
3.2
danielSTR

See private message.

$25.5 USD in 4 days
(9 Reviews)
3.4
IceG

See private message.

$21.25 USD in 4 days
(16 Reviews)
2.9
kmanb

See private message.

$21.25 USD in 4 days
(7 Reviews)
2.8
govega

See private message.

$38.25 USD in 4 days
(3 Reviews)
1.9
menelaus

See private message.

$25.5 USD in 4 days
(4 Reviews)
1.5
carlosodonell

See private message.

$38.25 USD in 4 days
(2 Reviews)
1.3
ckiewiet

See private message.

$15.3 USD in 4 days
(4 Reviews)
2.0
vladfatuvw

See private message.

$34 USD in 4 days
(4 Reviews)
1.7
peerdustvw

See private message.

$29.75 USD in 4 days
(1 Review)
0.0
clockwiseso

See private message.

$38.25 USD in 4 days
(0 Reviews)
0.0
banko

See private message.

$38.25 USD in 4 days
(0 Reviews)
0.0
psykohaxk

See private message.

$38.25 USD in 4 days
(0 Reviews)
0.0
mndave

See private message.

$25.5 USD in 4 days
(0 Reviews)
0.0