#include #include #include #include int main() { char *newArgv[100]; char command[100]; char *temp; while(1) { fgets(command,100,stdin); newArgv[0] = strdup(command); if(!strcmp(newArgv[0],"exit")) { break; } pid_t child; if(child = fork()) { } else { execve("/bin/ls",newArgv,NULL); } } return 0; }