Skip to content

Instantly share code, notes, and snippets.

@jan-matejka
Created April 26, 2013 22:27
Show Gist options
  • Select an option

  • Save jan-matejka/5470868 to your computer and use it in GitHub Desktop.

Select an option

Save jan-matejka/5470868 to your computer and use it in GitHub Desktop.
getenv wat
yac@rainbowdash % cat main.c
#include <stdio.h>
#include <stdlib.h>
int main(void) {
printf("PORTDIR=%s\n", getenv("PORTDIR"));
return 0;
}
--------------------------------------------------------------------------------
~/wat
yac@rainbowdash % gcc main.c
--------------------------------------------------------------------------------
~/wat
yac@rainbowdash % ./a.out
PORTDIR=(null)
--------------------------------------------------------------------------------
~/wat
yac@rainbowdash % echo $PORTDIR
/var/lib/cportage/portage
@jan-matejka
Copy link
Author

export export export
Duh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment