xref: /nrf52832-nimble/rt-thread/examples/libc/env.c (revision 042d53a763ad75cb1465103098bb88c245d95138)
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