2018-08-15 04:07:33 +03:00
|
|
|
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
|
|
|
* This file is part of ToaruOS and is released under the terms
|
2018-02-26 07:21:56 +03:00
|
|
|
* of the NCSA / University of Illinois License - see LICENSE.md
|
2018-05-01 11:12:56 +03:00
|
|
|
* Copyright (C) 2013-2018 K. Lange
|
2018-08-15 04:07:33 +03:00
|
|
|
*
|
|
|
|
* env - Print environment
|
|
|
|
*
|
|
|
|
* Prints all the environment values.
|
2018-02-26 07:21:56 +03:00
|
|
|
*/
|
|
|
|
#include <stdio.h>
|
2018-08-15 04:07:33 +03:00
|
|
|
#include <unistd.h>
|
2018-02-26 07:21:56 +03:00
|
|
|
|
|
|
|
int main(int argc, char ** argv) {
|
2018-08-15 04:07:33 +03:00
|
|
|
char ** env = environ;
|
|
|
|
|
|
|
|
while (*env) {
|
|
|
|
printf("%s\n", *env);
|
|
|
|
env++;
|
2018-02-26 07:21:56 +03:00
|
|
|
}
|
2018-08-15 04:07:33 +03:00
|
|
|
|
|
|
|
return 0;
|
2018-02-26 07:21:56 +03:00
|
|
|
}
|