Help a noob programmer - Access the $PATH
I'm a college student currently assigned to build a small shell for a Linux OS. Nothing really fancy like Bash, but I need to access the $PATH env variable so I'm able to use those common commands like cd or ls. The code is being built using C (compiling with gcc), so I could really use some help in has how I can, everytime a non absolute command is given, search through the directories listed in $PATH.
The man on the function execlp states that it already does this, but i'm not getting any results. Am I doing anything wrong?
BTW, I'm not only a noob programmer, but a Linux noob also :P 1st post...
Thx in advance.