Supported Platforms
Related Documentation
- ACX, EX, M, MX, PTX, SRX, T Series
- Summary of Extension Functions in the jcs and slax Namespaces
- get-secret() Function (jcs and slax Namespaces)
- output() Function (jcs and slax Namespaces)
- printf() Function (jcs and slax Namespaces)
- progress() Function (jcs and slax Namespaces)
- syslog() Function (jcs and slax Namespaces)
- trace() Function (jcs and slax Namespaces)
- ACX, EX, M, MX, SRX, T Series
- Junos Script Automation: Understanding Extension Functions in the jcs and slax Namespaces
get-input() Function (jcs and slax Namespaces)
Namespaces
SLAX Syntax
XSLT Syntax
Release Information
Function introduced in Junos OS Release 9.4.
Support for the slax namespace http://xml.libslax.org/slax added in Junos OS Release 12.2.
Description
Invoke a CLI prompt and wait for user input. The user input is defined as a string for subsequent use. If the script is run non-interactively, the function returns an empty value. This function cannot be used with event scripts.
The prefix associated with the namespace URI should be defined in the prefix-to-namespace mapping in the style sheet.
Parameters
string | — | CLI prompt text. |
Return Value
user-input | — | Text typed by the user and stored as a string. The return value will be empty if the script is run non-interactively. |
Usage Examples
In the following example, the user is prompted to enter a login name. The user’s input is stored in the variable $username.
var $username = jcs:get-input("Enter login id: ");
Related Documentation
- ACX, EX, M, MX, PTX, SRX, T Series
- Summary of Extension Functions in the jcs and slax Namespaces
- get-secret() Function (jcs and slax Namespaces)
- output() Function (jcs and slax Namespaces)
- printf() Function (jcs and slax Namespaces)
- progress() Function (jcs and slax Namespaces)
- syslog() Function (jcs and slax Namespaces)
- trace() Function (jcs and slax Namespaces)
- ACX, EX, M, MX, SRX, T Series
- Junos Script Automation: Understanding Extension Functions in the jcs and slax Namespaces
Published: 2013-07-26
Supported Platforms
Related Documentation
- ACX, EX, M, MX, PTX, SRX, T Series
- Summary of Extension Functions in the jcs and slax Namespaces
- get-secret() Function (jcs and slax Namespaces)
- output() Function (jcs and slax Namespaces)
- printf() Function (jcs and slax Namespaces)
- progress() Function (jcs and slax Namespaces)
- syslog() Function (jcs and slax Namespaces)
- trace() Function (jcs and slax Namespaces)
- ACX, EX, M, MX, SRX, T Series
- Junos Script Automation: Understanding Extension Functions in the jcs and slax Namespaces