C Program to emulate Unix Shell

Closed Posted Aug 6, 2014 Paid on delivery
Closed Paid on delivery

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

C Programming UNIX

Project ID: #6285708

About the project

9 proposals Remote project Active Sep 12, 2014

9 freelancers are bidding on average ₹3073 for this job

kandamunlabs

A proposal has not yet been provided

₹5555 INR in 2 days
(44 Reviews)
5.5
kteja85

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

₹1300 INR in 1 day
(33 Reviews)
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 More

₹12777 INR in 5 days
(80 Reviews)
5.2
Steamprodz

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

₹1500 INR in 2 days
(0 Reviews)
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 in 3 days
(0 Reviews)
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 in 1 day
(0 Reviews)
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 More

₹1250 INR in 3 days
(0 Reviews)
0.0
kp21

A proposal has not yet been provided

₹1350 INR in 3 days
(0 Reviews)
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 More

₹1775 INR in 1 day
(0 Reviews)
0.0