Dear all,
I've been trying to get the value of the PATH variable (unix) from a C program. The only thing I could think of is to loop through the .login file, but that seems like an overkill. Is there a simpler way to do this?
Thanks,
Fred
Dear all,
I've been trying to get the value of the PATH variable (unix) from a C program. The only thing I could think of is to loop through the .login file, but that seems like an overkill. Is there a simpler way to do this?
Thanks,
Fred
Hi,
getenv() function can be used
just include stdlib.h
#include<stdlib.h>
main()
{
printf("%s",getenv("PATH"));
}
And this should do .
Be HAPPY