getenv variable
This command is used to display the value of a variable
in the set
of environment variables.
This command will return 1 and print a diagnostic message if a failure occurs.
The entire RTEMS application shares a single set of environment variables.
The following is an example of how to use getenv
:
SHLL [/] $ getenv BASEPATH /mnt/hda1
This command is included in the default shell command set.
When building a custom command set, define
CONFIGURE_SHELL_COMMAND_GETENV
to have this
command included.
This command can be excluded from the shell command set by
defining CONFIGURE_SHELL_NO_COMMAND_GETENV
when all
shell commands have been configured.
The getenv
is implemented by a C language function
which has the following prototype:
int rtems_shell_rtems_main_getenv( int argc, char **argv );
The configuration structure for the getenv
has the
following prototype:
extern rtems_shell_cmd_t rtems_shell_GETENV_Command;
Copyright © 1988-2008 OAR Corporation