jcs:get-input() / jcs:input()
jcs:get-input() function (known as
jcs:input() in Junos 9.4 and 9.5) causes a prompt to be displayed on the console while the script engine pauses for the user to type a response that is terminated by the enter key. A prompt string is specified as the only argument to the function, the entered answer is returned as a string:
var $user-input = jcs:get-input(“Enter your favorite protocol:“);
jcs:get-secret() function works in the same way as
jcs:getinput() except that the user input is not echoed to the screen. This makes the function ideal when the user must enter sensitive information such as passwords.