1. fw_printenv(自己也可定义): 可以打印出在uboot中设置的环境变量的值。
2. env/printenv 都是打印当系统环境变量。
不同的是printenv不加参数和env一样,printenv可以打印指定名称的环境变量。
ENV(1) User Commands ENV(1)
NAME
env - run a program in a modified environment
SYNOPSIS
env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...]
DESCRIPTION
Set each NAME to VALUE in the environment and run COMMAND.
-i, --ignore-environment
start with an empty environment
-u, --unset=NAME
remove variable from the environment
--help display this help and exit
--version
output version information and exit
A mere - implies -i. If no COMMAND, print the resulting environment.
PRINTENV(1) User Commands PRINTENV(1)
NAME
printenv - print all or part of environment
SYNOPSIS
printenv [VARIABLE]...
printenv OPTION
DESCRIPTION
Print the values of the specified environment VARIABLE(s). If no VARIABLE is specified, print name and value pairs for them all.
--help display this help and exit
--version
output version information and exit
NOTE: your shell may have its own version of printenv, which usually supersedes the version described here. Please refer to your shellâs documentation for details about
the options it supports.