Hi,
I am programming a UNIX shell and I have to use the execv() system call to create a process. One of the parameters for execv() is the filepath for the executable. So if somebody types in /bin/ls, it will run the ls executable. But what I need is a function that when ls is typed, it will search for the filepath of ls (like the "which" command). Is there a function which allows me to do that?