Question: this is the the code that you need to work with #include #include #include #define MAX_CMN_LEN 100 int main(int argc, char *argv[]) { char cmd[MAX_CMN_LEN]

this is the the code that you need to work with
#include #include #include
#define MAX_CMN_LEN 100
int main(int argc, char *argv[]) { char cmd[MAX_CMN_LEN] = "", **p;
if (argc
return 0; }
how to run programm:-
1). open up a terminal and compile the program
2). run it (for example in Ubuntu) ./program_name comman_name -anything - anything
example: ./a.out ls
Output:- It will print all current directory folder and file name.
(redirecting output using dup or dup2) Add to the MoreShell ability to execute command lines with commands connected by pipes. Use dup2 or dup system call to redirect IO Example: Is -1 | wc . (DupShell.c DupShell)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
