run script

run script filename {arg1} {arg2} ... {arg9}


Run (plays back) an ASCII-formatted configuration file or a user-written script file on the switch. This command is synonomous with the load script command.

Syntax Description

filename Specifies the user-defined name of the ASCII-formatted configuration file or a user-written script file. The script file is known as the XOS script file and uses the .xsf file extension.
arg Specifies up to nine variable values that can be specified by the user. The variables are created with the names CLI.ARGV1, CLI.ARGV2, ... CLIARGV9.



Usage Guidelines

Use this command to load an ASCII-formatted configuration file or a user-written script file.

Configuration File: After downloading the configuration file from the TFTP server, this command loads and restores the ASCII-formatted configuration file to the switch.

An ASCII-formatted configuration file uses the .xsf file extension, not the .cfg file extension. The .xsf file extension (known as the XOS script file) saves the XML-based configuration in an ASCII format readable by a text editor.

For more detailed information about the ASCII configuration file, including the steps involved to upload, download, and save the configuration, see the upload configuration [hostname | ipaddress] filename {vr vr-name} command.

User-Written Script File: After writing a script, this command executes the script and passes arguments to it. As with the configuration files, these files use the .xsf file extension that is automatically added.

The command allows up to nine optional variable values to be passed to the script. These are created with the names CLI.ARGV1, CLI.ARGV2, CLI.ARGV3, ... CLI.ARGV9.

In addition, two other variables are always created. CLI.ARGC gives the count of the number of parameters passed, and CLI.ARGV0 contains the name of the script that is being executed.

To check the variable values use the command, show var.



Only the .xsf extension is used. The load script command assumes an .xsf extension and retries opening the file if the file cannot be found with the original specified name or no extension is provided.


The following command loads the ASCII-formatted configuration named configbackup.xsf:

load script configbackup.xsf

After issuing this command, the ASCII configuration quickly scrolls across the screen. The following is an example of the type of information displayed when loading the ASCII configuration file:

script.meg_upload_config1.xsf.389 # enable snmp access
script.meg_upload_config1.xsf.390 # enable snmp traps
script.meg_upload_config1.xsf.391 # configure mstp region purple
script.meg_upload_config1.xsf.392 # configure mstp revision 3
script.meg_upload_config1.xsf.393 # configure mstp format 0
script.meg_upload_config1.xsf.394 # create stpd s0


ExtremeXOS 15.6 provided capability for Python scripting. Current Python scripting implementation allows a script to interact directly with the CLI inteface for managing ExtremeXOS functionality. Python script files end in .py. The .py suffix on the script file name tells the run script command to use the Python interpreter to process the script file. This command is functions exactly as load script.

This command was first available in ExtremeXOS 15.6.

Scripting support for Python 2.7.3 was added in ExtremeXOS 15.6.

Platform Availability

This command is available on the Summit X450-G2, X460-G2, X670-G2, X770, and ExtremeSwitching X440-G2, X620, X690, X870 series switches.