Đã hoàn thành

A tiny Shell-line “command executor”

Preliminaries

In this project we implement a “command executor”, in other words, a very simplistic Shell.

You should first download the ./[login to view URL] archive, which contains the starting code for the project. Once you’ve downloaded the archive you can uncompress it and examine it as follows:

% tar -xf [login to view URL]

% cd command_executor

% ls

Makefile command_executor.c solution.c

The file solution.c contain an empty solution that does nothing but print “not implemented yet”. This is the file you’ll have to modify.

Important: Do not modify command_executor.c or Makefile

You can build and run the program right now (type make to compile the program). It should prompt you for a command to run (e.g., “/bin/ls -la”) and then ask you two Yes/No questions about how to run it (only one Yes is allowed):

Should the output of the command be redirected to a file?

Should the output of the command be redirected to another command?

So, we have three cases:

Plain execution of the command: no redirection of output

Execution of the command with redirection of output to a file

Execution of the command with redirection of output to another command, whose output is not redirected

And you’ll see in solution.c that you thus have three functions to implement:

void execute_plain(char *cmd, char *const argv[])

void execute_output_to_file(char *cmd, char *const argv[])

void execute_output_to_other(char *cmd, char *const argv[])

All three function are passed the command (e.g., “/bin/ls”) and its arguments (e.g., {“-la”, NULL}). In each of the questions below we implement one of these functions to make our tiny Shell work.

For testing, you’ll have to run various commands. Good candidates are ls, cat, wc, cp, mv, rm, sleep, and many others.

Kĩ năng: Lập trình C, Lập trình C++, Kiến trúc phần mềm, Linux, Lập trình C#

Xem nhiều hơn: next line command, perforce command line command, java read line command line input commands, command line command software inventory, curl unix action line command, perl automation shell bash command, adding icon shell open command, command line command remove program linux, services line command add user, how to open a port in windows command line, how to run a program in linux command line, how do i run a python script from command line?, run a java project from command line, shell script to read a csv file line by line, how to save a file in python command line, how to build a java project from command line, linux command to move all files in a directory, how to edit and save a file in linux command line, how to check a url in linux command line

Về Bên Thuê:
( 2 nhận xét ) Honolulu, United States

ID dự án: #24024940

Được trao cho:

atul0x60

Pm me, i can do this.

$55 USD trong 2 ngày
(13 Đánh Giá)
3.4

6 freelancer đang chào giá trung bình $128 cho công việc này

liveexperts123

Hi there, I have read your project description and i'm an expert in C programming and machine learning therefore i can do this project for you perfectly.I still have a few questions. please leave a message on my chat s Thêm

$250 USD trong 4 ngày
(70 Nhận xét)
7.3
umg536

Hi there, Being an expert in C, and C++ programming I can do this project for you. please leave a message on my chat so we can discuss the budget and deadline of the project. Also, have a look at my profile for my rev Thêm

$250 USD trong 5 ngày
(28 Nhận xét)
6.4
kalyanprakash123

Keen to do this, please discuss. Negotiable price and duration...........................................................................................................................................................

$45 USD trong 2 ngày
(5 Nhận xét)
3.2
hayteekeys

helllo, I have worked both full time and part time as a Windows desktop/embedded *C/C++(MT4, 5)/C#/PYTHON/arduino developer for over 7 years now, I have done many simple and complex projects with Visual Studio and C+ Thêm

$30 USD trong 1 ngày
(3 Nhận xét)
2.5
boxifi7831

I READ YOUR POST I CAN DO IT FOR YOU Hello I am a senior developer. I want to do it for you if you want. we can discuss more about this project. if you can send a reply. I waiting for you best response. let me discuss Thêm

$140 USD trong 7 ngày
(1 Nhận xét)
0.3