Is the following code correct:
char * cmd="ls -l"; /* Unix command used for listing */
char * spCmd;
spCmd = strtok(cmd , " ");/* it divides the cmd in to tokens */
execvp(spCmd , spCmd);
the output of this code is to execute command that is written in cmd ?
if there are any good solution plz provide them here?thanx