I'm coding a shell. . .
I have aI am able to get the newargv array to point to words when inputted in the program. For instance a user inputting "echo something 2 3" would result in newargv[0] pointing to the e of the string, newargv[1] pointing to s of the string, etc. . .Code:char *newargv[MAX];
This is a problem since when I fork and then use execvpexecvp is not just getting the word echo but the whole string "echo something 2 3" for example. . . any ways to get just the first word? something simple and clean also I'll probably need to get the other words separately too later on but not that far ahead to really know.Code:execvp(newargv[0], newargv];