I am trying to create a basic shell program in C that runs 10
commands and then quits. Only one word commands are required,
like:
cal, date, ls, ps, pwd, who, quit
The part I am struggling with is passing the scanned command
into my array in the child process to be executed using
execvp().
Here is my code:
#include <stdio.h>
#include <string.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/wait.h>
#include<readline/readline.h>
#include<readline/history.h>
#define MAX_CMD_NUMBER 10
int main()
{
int i;
char...