Skip to content

Instantly share code, notes, and snippets.

@rongyi
Created April 23, 2014 09:09
Show Gist options
  • Save rongyi/11208112 to your computer and use it in GitHub Desktop.
Save rongyi/11208112 to your computer and use it in GitHub Desktop.
print environ
#include <unistd.h>
#include <stdio.h>
extern char **environ;
int main()
{
int i = 0;
while(environ[i]) {
printf("%s\n", environ[i++]);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment