get full path of a command (in C)
I'm trying to write a very simple shell in C that
Prompts the user for a command,
Parses the command line,
Execute the command while passing to it the arguments passed on the command
say the desired command is in variable cmd
How can i get the full path of this specific cmd??
(anything like path = getenv("PATH"); ??)
Thank you for your time.