1 /*
2  * Copyright (c) 2006-2021, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2010-11-17     Bernard      first version
9  */
10 
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <finsh.h>
14 
libc_env()15 int libc_env()
16 {
17     printf("PATH=%s\n", getenv("PATH"));
18     putenv("foo=bar");
19     printf("foo=%s\n", getenv("foo"));
20     return 0;
21 }
22 FINSH_FUNCTION_EXPORT(libc_env, get/set_env test);
23