CORBA 2.6 Administration Guide
is the name of a script file.
A script file can contain:
Any of the cfgmgt commands that this appendix describes●
Any of the constructs that the following table describes●
The source command reads each command in the script file and processes it as if it had been entered
manually.
Script File Constructs
Construct Explanation
Comment A comment begins with the hash character #. Everything to the right of # is ignored.
Line
continuation
Ending a line with a backslash (\) causes the next line to be concatenated to the current
line. Leading white space, if any, becomes part of the concatenated line.
Escaped
character
To use the dollar sign or backslash characters ($ or \) as themselves, precede them with a
backslash (\).
Variable
You can define variables, give them values and use them later in the script. To define a
variable and give it a value, use the set command; for example:
set hostname 172.26.27.127
To use the variable later in the script, prefix it with a $ (dollar sign); for example:
entityaddkeyvalue ZNCA@comm_server host_name $hostname
Expression
Calculate values with expr expression; for example, this code sets the value of
portnumber1 to portnumber0 + 1:
set portnumber0 4090
set portnumber1 [expr $portnumber0 + 1]
Environment
variable
$env(variable) substitutes the value of the environment variable for the expression.
For example, this code associates the value of the environment variable NSD_ROOT with
the key product_dir_oss in the entity default@ORB:
entityaddkeyvalue default@ORB product_dir_oss $env(NSD_ROOT)
Note that $env(variable) is not allowed inside the braces of the entity command.
Instead you must use another command such as entityaddkeyvalue.
Catch
To ignore errors in command execution, use catch {command}, where command is
any cfgmgt command.
For example, to delete the entity default@ORB if it exists but ignore the error if it does
not exist, use a command such as:
catch { entitydelete default@ORB }