- 07 Jan 2025
- 2 Minutes à lire
- SombreLumière
- PDF
Tcl Command-Line Administration tool Help
- Mis à jour le 07 Jan 2025
- 2 Minutes à lire
- SombreLumière
- PDF
To access help from the command prompt, run any of the following commands from a Tcl command prompt:
help
Provides basic information about the application, including a list of all commands available.
help command
Provides information about the specific command, including required parameters, optional parameters, and available sub-commands.
help commandsubcommand
Provides information about the specific sub-command, including required and optional parameters.
Command parameters
Command parameters in Tcl are specified in list form, e.g. {field1 value1 field2 value2 ...}. Parameter values that include whitespace characters require double quotes or { }, e.g. {field1 “value 1” field2 {value 2} ...}
You can also substitute commands for parameters, where the command will return the type of parameter(s) required. For example:
foreach i [user query {domain master} {domain userid has_dp}] { puts $i }
In this example, a query returns a list of users with assigned authenticators, which is used in the foreach command.
Result output
Results are typically returned in list form, with pairs of field names and values. For example:
{domain master userid user0001 has_dp Assigned}
Some commands do not return field information, only a simple message, e.g.:
Created Component.
Queries return a list of list results, with only the requested fields displayed. These may be formatted for better readability by wrapping the query in another command, e.g.:
foreach i [user query {domain master} {domain userid has_dp}] { puts $i }
The result from the example above will display each user record in the master domain on a separate line, and only display the requested fields (domain, userid and has_dp), e.g.:
domain master userid admin has_dp Assigned
domain master userid user0001 has_dp Unassigned
Error handling
When an error occurs in a OneSpan Tcl Extension command, information about the error will be written to the standard Tcl error variables. This allows error handling in scripts, and allows a user to obtain information about the last error received when using an interactive command line. For example, with the following command:
% user get {userid doesnotexist}
If a user with the ID of doesnotexist could not be found, then this error would be returned:
Error code: <-13> Error message: <The object specified was not found.>
Information about that error could be retrieved from standard Tcl error variables using these commands:
% puts $errorCode
Returns -13.
% puts $errorInfo
Returns "Error code: <-13> Error message: <The object specified was not found.>".
Syntax notes
- Result values that include whitespace characters, including date/time values, are given { } by Tcl.
- Comments in scripts are preceded with a #.
- A backslash character (\) at the end of a line indicates that the command is continued on the next line.