Scripting Commands
©2008 Allied Telesis Inc. All rights reserved.
11.2
AlliedWare Plus
TM
Operating System Software Reference C613-50003-00 REV E
Software Version 5.2.1
activate
This command activates a script file.
Syntax
activate [background] <
script
>
Mode
Privileged Exec mode.
Usage
In a stacked environment you can use the CLI on a stack master to access file systems that are
located on a slave device. In this case the command specifies a file on the slave device. The
slave’s file system will be denoted by: <hostname>-<member-id> For example, awplus-1 for
member 1, awplus-2 for member 2 etc.
When a script is activated the privilege level is set to 1 enabling User Exec commands to run in
the script. If you need to run Privileged Exec or Configure mode commands in your script you
need to add an
enable
command to the start of your script. Note that if a password is set for
Privileged Exec mode you will also need to add the password to your script after
enable
.
Example
To activate a command script to run as a background process, use the command:
awplus#
activate background test.scp
To activate a script
/flash:/test.scp
in stack member 2, use the command:
awplus-1#
activate awplus-2/flash:/test.scp
echo
This command echoes a string to the terminal, followed by a blank line. It is useful in CLI scripts,
to make the script print user-visible comments.
Syntax
echo <
line
>
Mode
Exec mode and Privileged Exec mode
Example
awplus# echo Hello World
Hello World
Parameter
Description
activate
Activate a script
background
Activate a script to run in the background. A process that is running in the
background will operate as a separate task, and will not interrupt
foreground processing. Generally, we recommend running short,
interactive scripts in the foreground and longer scripts in the background.
The default is to run the script in the foreground.
<script>
The file name of the script to activate. The script is a command script
consisting of commands documented in this software reference.
Parameter
Description
echo
Echo a string
<
line
>
The string to echo.