I am trying to implement some kind of a which program. I could get the PATH environment variable and was able to tokenize it. I have a list of paths in tokens. Now, I have the name of the shell command. How would I search the tokens and display where the command was found?