-
printenv with environ Write a program that prints the environment using the global variable environ.
-
env vs environ Write a program that prints the address of env (the third parameter of the main function) and environ (the global variable). Are they they same? Does this make sense?
-
getenv() Write a function that gets an environment variable. (without using getenv)
Prototype: char *_getenv(const char *name); man 3 getenv
-
PATH Write a function that prints each directory contained in the the environment variable PATH, one directory per line.
-
PATH Write a function that builds a linked list of the PATH directories.
-
setenv Write a function that changes or adds an environment variable (without using setenv).
Prototype: int _setenv(const char *name, const char *value, int overwrite); man 3 setenv
- unsetenv Write a function that deletes the variable name from the environment (without using unsetenv).
Prototype: int _unsetenv(const char *name); man 3 unsetenv