Question: c program called shell.exe that will read user input and then decide which system command it will execute and then execute it with all the

c program called shell.exe that will read user input and then decide which system command it will execute and then execute it with all the parameters given. The program basically should call other already made programs and not incorporate the code in the shell.

Example:

C:\> shell.exe > test.txt > wrongComand Command not found > ExiT C:\>

One of the other programs:

c program called shell.exe that will read user input and then decide

int main(int argc, char ** argv[]) //inline paramaters { FILE *sourceFile; FILE *destFile; char *letter = argv[1]; int count = atoi (argv[2]); char *sourcePath = argv[3]; char *destPath = argv[4]; char h[] = "h" char t[] = "t "; int i = 0; char ch[100]; //character maximum of 100 //function to read from bottom up char *my_read(FILE *sourceFile) int x, size; char *buffer; //find source file and seek the end fseek(sourceFile, 0, SEEK_END); size = ftell(sourceFile); //memory allocation size + 1 buffer = malloc((size+1) * sizeof(char)); //for loop for memory allocation for (x=0; x

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!