ControlTier > core


Command Reference


executes a command

Executes a script. The executable program to interpret the script must be specified with the -executable option. The script can be specified with the -script, -scriptfile or -scripturl options.

For all of the script source options, the script that is executed is first interpreted to expand both Ant property references of the form ${propertyname} and Ant filters of the form @propertyname@. The properties available are the properties available to command handlers. If the exec command is executed in a static context, then the properties are the static context properties. If it is executed in an object context (e.g. dispatched via the Deployment exec command) then the object context properties are available, including attributes, etc.

static: This command can be run outside of an object context.


ctl -m shellutil -c exec [-argline <>] -executable <> [-exportprops <.*>] [-failonerror <true>] [-os <>] [-output <>] [-script <>] [-scriptfile <>] [-scripturl <>]


Option Description Type Default
argline arguments to pass

The argline will be passed to executable if no scriptfile or scripturl is specified. Otherwise, the argline is passed to the scriptfile/scripturl.

executable executable path string
exportprops properties to export as environment variables

Maps property data to environment variables. By default all properties are exported.

Property names are mapped to environment variables using these formatting rules: Dots (".") are translated to underscores ("_") and all characters are capitalized.

You can filter specific sets of properties based on regex pattern. If you just want to export option, context, and entity properties you could use this pattern: ^(?:opts|context|entity).*.

Since 3.4.7

string .*
failonerror fail if there is an error (true/false). string true
os list of Operating Systems on which the command may be executed. string
output Name of a file to which to write the output. If the error stream is not also redirected to a file or property, it will appear in this output. string
script script to execute string
scriptfile scriptfile to execute string
scripturl URL of a script to execute, supporting the dav:// protocol string