1 .. SPDX-License-Identifier: GPL-2.0+:
11 askenv name [message] [size]
16 Display message and get environment variable name of max size characters
20 name of the environment variable
23 message is displayed while the command waits for the value to be
24 entered from stdin.if no message is specified,a default message
25 "Please enter name:" will be displayed.
28 maximum number of characters that will be stored in environment
29 variable name.this is in decimal number format (unlike in
30 other commands where size values are in hexa-decimal). Default
31 value of size is 1023 (CONFIG_SYS_CBSIZE - 1).
36 Value of a environment variable env1 without message and size parameters:
40 => askenv env1;echo $?
41 Please enter 'env1': val1
46 Value of a environment variable env2 with message and size parameters:
50 => askenv env2 Please type-in a value for env2: 10;echo $?
51 Please type-in a value for env2: 1234567890123
56 Value of a environment variable env3 with size parameter only:
60 => askenv env3 10;echo $?
61 Please enter 'env3': val3
66 Return Value of askenv command, when used without any other arguments:
71 askenv - get environment variables from stdin
74 askenv name [message] [size]
75 - display 'message' and get environment variable 'name' from stdin (max 'size' chars)
81 The askenv command is only available if CMD_ASKENV=y
86 The return value $? is set to 0 (true).
87 If no other arguments are specified (along with askenv), it is set to 1 (false).