1 /* 2 * env.c 3 * 4 * Created on: 2010-11-17 5 * Author: bernard 6 */ 7 #include <stdio.h> 8 #include <stdlib.h> 9 #include <finsh.h> 10 11 int libc_env() 12 { 13 printf("PATH=%s\n", getenv("PATH")); 14 putenv("foo=bar"); 15 printf("foo=%s\n", getenv("foo")); 16 return 0; 17 } 18 FINSH_FUNCTION_EXPORT(libc_env, get/set_env test); 19