Shell in C

Përfunduar Postuar Mar 15, 2010 Paguhet në dorëzim
Përfunduar Paguhet në dorëzim

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)

Programim C Chrome OS Inxhinieri Linux Mac OS MySQL PHP Menaxhim projekti Arkitekturë softuerësh Testim Softuerësh UNIX Tryeza Windows

ID Projekti: #3261632

Rreth projektit

26 propozimet Projekti në distancë Aktiv Mar 15, 2010

Është zgjedhur fitues:

mz41

See private message.

$38.25 USD për 4 ditë
(29 Përshtypje)
4.1

26 profesionistë freelancer dërguan një ofertë mesatare prej $31 për këtë punë

alexpast

See private message.

$38.25 USD për 4 ditë
(33 Përshtypje)
5.5
vw6868760vw

See private message.

$38.25 USD për 4 ditë
(52 Përshtypje)
5.5
Vicul

See private message.

$38.02 USD për 4 ditë
(17 Përshtypje)
4.9
bitsensesof

See private message.

$38.25 USD për 4 ditë
(33 Përshtypje)
4.2
etaigur

See private message.

$21.25 USD për 4 ditë
(18 Përshtypje)
4.3
StrongDecs

See private message.

$17 USD për 4 ditë
(30 Përshtypje)
4.8
vw7039544vw

See private message.

$38.25 USD për 4 ditë
(8 Përshtypje)
3.2
danielSTR

See private message.

$25.5 USD për 4 ditë
(9 Përshtypje)
3.4
IceG

See private message.

$21.25 USD për 4 ditë
(16 Përshtypje)
2.9
kmanb

See private message.

$21.25 USD për 4 ditë
(7 Përshtypje)
2.8
govega

See private message.

$38.25 USD për 4 ditë
(3 Përshtypje)
1.9
menelaus

See private message.

$25.5 USD për 4 ditë
(4 Përshtypje)
1.5
carlosodonell

See private message.

$38.25 USD për 4 ditë
(2 Përshtypje)
1.3
ckiewiet

See private message.

$15.3 USD për 4 ditë
(4 Përshtypje)
2.0
vladfatuvw

See private message.

$34 USD për 4 ditë
(4 Përshtypje)
1.7
peerdustvw

See private message.

$29.75 USD për 4 ditë
(1 përshtypje)
0.0
clockwiseso

See private message.

$38.25 USD për 4 ditë
(0 Përshtypje)
0.0
banko

See private message.

$38.25 USD për 4 ditë
(0 Përshtypje)
0.0
psykohaxk

See private message.

$38.25 USD për 4 ditë
(0 Përshtypje)
0.0
mndave

See private message.

$25.5 USD për 4 ditë
(0 Përshtypje)
0.0