hey there
i have to execute commands that are written on the command line in unix. i have already separated the commands into tokens but now im stuck with the problem of how to actually execute those commands.
eg: lets say the user entered " ls -l" to list all the files in a directory
pid_t pid;
if ( (pid = fork()) < 0)
fprintf(stderr,"fork error");
else if (pid == 0) { /* child */
// NOW WHAT GOES HERE ????
}
feedback would be appreciated.
thanks
mile1982