C Program to emulate Unix Shell

Cerrado Publicado Aug 6, 2014 Pagado a la entrega
Cerrado Pagado a la entrega

1. A C program which can accept the following commands and perform the required actions:

a) mkdir ­ Create a directory

sample inputs:

Single directory ­ mkdir dir1

Multiple directories ­ mkdir folder1 folder2 folder2/folder3

Absolute Path ­ mkdir /rootpath/subdir/subdir2

b) cd ­ Change CWD to specified directory

c) rm ­ Remove a directory or a file

sample inputs:

Remove file(s) ­ rm file1 file2 file3

Remove empty directory ­ rm ­d dir1

Remove a directory and its contents rm ­r dir2

d) mv ­ Move (cut & Paste) a file/Directory from one location to another

mv sourceDirectory targetDirectory

mv sourceFile targetFile

e) cp ­ Copy a file/Directory to another destination.

f) ls ­ List the Directory contents

g) pwd ­ Print the CWD Path

The above given commands need to be executed with standard C functions for Unix. Usage of

exec family/system() along with bash commands is strictly prohibited.

2. A C program to accept strings in either of these forms and perform redirection: EXEC/ SYSTEM() ARE ALLOWED!

<executable_program> > <output_file>

<executable_program> < <input_file>

<executable_program> < <input_file> > <output_file>

example:

sort < [login to view URL] > [login to view URL]

3. A C program to accept the names of two or more executable programs and redirect the

output of the first program to the input of the second program, output of the second program to

the input of the third program, and so on.

The executable files will be separated by |

example:

ls | sort | wc

4. A C program to combine all the above 3 parts.

Along with all the above functionalities and commands, the program should execute any binary

file that is either in the given relative/absolute path or those in the $PATH environment. You must

use exec family of functions for executing these binaries, but not for the commands specified in

part 1.

example:

ls | sort ­r > [login to view URL]

ls is from your own function

sort ­r from exec functions

redirection and piping again from your own functions

Deliverables:

The C programs for parts 1­4 compressed in a .tar file

Programación en C UNIX

Nº del proyecto: #6285708

Sobre el proyecto

9 propuestas Proyecto remoto Activo Sep 12, 2014

9 freelancers están ofertando un promedio de ₹3073 por este trabajo

kandamunlabs

A proposal has not yet been provided

₹5555 INR en 2 días
(44 comentarios)
5.5
kteja85

hi i can deliver this in less than 6 hours please fell free to contact me thanks ##########@#############

₹1300 INR en 1 día
(33 comentarios)
5.3
idleswell

Hello, I have 30 years experience programming in C. I have developed several of these shells with the features you describe. I will create a modular program in C to provide all these required features. A miles Más

₹12777 INR en 5 días
(80 comentarios)
5.2
Steamprodz

Can make it fast. Work for a few hours. Have nice experience in concole C programming. Skype: anjsteam

₹1500 INR en 2 días
(0 comentarios)
0.0
ScksAk

Hi, I'm new here(freelancer.com). I'm professional on linux and programming. If you need more further info, feel free to contact with me. Best regards, ScksAk

₹1300 INR en 3 días
(0 comentarios)
0.0
alexflo088

Hello. I'm an C/C++ developer with 6 years experience in the field. It will be a pleasure to do this task

₹850 INR en 1 día
(0 comentarios)
0.0
Shyamsunthar

Have experience in developing Unix shell scripting and also in c programming. Already Worked as freelancer. Ensure the zero defects in result. Cross platform knowledge in developing toold in shell scripting. Will deli Más

₹1250 INR en 3 días
(0 comentarios)
0.0
kp21

A proposal has not yet been provided

₹1350 INR en 3 días
(0 comentarios)
0.0
swheelhouse

G'day! I can do this very easily, I'll have it done in a matter of hours. There are system calls for all the requirements in item (1) which I can quickly leverage to perform those tasks. Item (2) is a very simple re Más

₹1775 INR en 1 día
(0 comentarios)
0.0