jcs:get-input() / jcs:input()

The 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()
The 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.

version 1.0;

ns junos = "http://xml.juniper.net/junos/*/junos";
ns xnm = "http://xml.juniper.net/xnm/1.1/xnm";
ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0";

import "../import/junos.xsl";

match / {
    <op-script-results> {
        var $input = { expr jcs:get-input("Enter some input and hit enter: "); }
        <output> "You've entered " _$input;
    }
}