sos-code-article10/userland/envtest.c

17 lines
282 B
C
Raw Permalink Normal View History

2018-07-13 17:13:10 +02:00
#include <libc.h>
int main(int argc, char * argv[], char *envp[])
{
int i;
char **e;
printf("Nargs: %d\n", argc);
for (i = 0 ; i < argc ; i ++)
printf(" arg[%d] = |%s|\n", i, argv[i]);
for (e = envp ; e && *e ; e ++)
printf(" ENV |%s|\n", *e);
return 0;
}