set hscript command
Sets a local variable.
Usages
set [-g] name = valueset -u nameset -p name = valueset [-s]
Without any arguments, the command prints a list of current local variables (see the -s option).
Options
-g | Make the variable global. |
-u | Unset the variable. |
-p | Set the variable in the calling (parent) script. This option lets you return values from within sourced scripts, by directly setting a variable in the caller. |
-s | Without any other arguments, prints the current variables in the form of commands. |
Examples
set num = 1234echo $num
Prints 1234.
set nodes = `run("ls")`
Sets $nodes to the result of the ls command.
