Linux C函数库参考手册之环境变量函数

getenv(取得环境变量内容)

#include <stdlib.h>
char *getenv(const char *name);

putenv(改变或增加环境变量)

#include <stdlib.h>
int putenv(char *string);

setenv(改变或增加环境变量)

#include <stdlib.h>
int setenv(const char *name, const char *value, int overwrite);

unsetenv(清除环境变量内容)

#include <stdlib.h>
int unsetenv(const char *name);

Leave a Reply

Your email address will not be published. Required fields are marked *