1.. SPDX-License-Identifier: GPL-2.0+: 2 3askenv command 4=============== 5 6Synopsis 7-------- 8 9:: 10 11 askenv name [message] [size] 12 13Description 14----------- 15 16Display message and get environment variable name of max size characters 17from stdin. 18 19name 20 name of the environment variable 21 22message 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. 26 27size 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). 32 33Example 34------- 35 36Value of a environment variable env1 without message and size parameters: 37 38:: 39 40 => askenv env1;echo $? 41 Please enter 'env1': val1 42 0 43 => printenv env1 44 env1=val1 45 46Value of a environment variable env2 with message and size parameters: 47 48:: 49 50 => askenv env2 Please type-in a value for env2: 10;echo $? 51 Please type-in a value for env2: 1234567890123 52 0 53 => printenv env2 54 env2=1234567890 55 56Value of a environment variable env3 with size parameter only: 57 58:: 59 60 => askenv env3 10;echo $? 61 Please enter 'env3': val3 62 0 63 => printenv env3 64 env3=val3 65 66Return Value of askenv command, when used without any other arguments: 67 68:: 69 70 => askenv;echo $? 71 askenv - get environment variables from stdin 72 73 Usage: 74 askenv name [message] [size] 75 - display 'message' and get environment variable 'name' from stdin (max 'size' chars) 76 1 77 78Configuration 79------------- 80 81The askenv command is only available if CMD_ASKENV=y 82 83Return value 84------------ 85 86The return value $? is set to 0 (true). 87If no other arguments are specified (along with askenv), it is set to 1 (false). 88