how can i write a c program to read in a command, not command line, and then pass what they enter into the exec system call and execute their command. the command can have any number of parameters
how can i write a c program to read in a command, not command line, and then pass what they enter into the exec system call and execute their command. the command can have any number of parameters
hope you are not making a SUID program
read manual of
"man execlp,execl.exec,excve
"use strtokl to parse the command from the arguments
cheers
Rohit
what is the strtokl call.
sorry typo mistake it's strtok
Find the next token in a string.
char *strtok( char *strToken, const char *strDelimit );
cheers
Rohit