Single-command mode

You start the single-command mode by using the command-line parameter -c. In this mode, the CLI executes only the specified command, and ends after receiving the response message for that command from the service. For example, to create a role, enter:
dnicli -i INST1 -ou SYSOU -s DNI_SECADM -c "cre -ro Approver"

The CLI program dnicli generates a request message and sends it to the service DNI_SECADM. It then waits until the service sends a response message. After the command is executed, a user text message is written to the command line. Finally, the CLI program ends. The return code of the CLI program depends on the completion code of the executed FTM SWIFT command.

The single-command mode is useful when you need to evaluate return codes from system batch files or shell scripts. For a listing of the return codes, see CLI return codes for all commands.

Note: Some shells also have escape sequences for certain characters. For example, the Bash uses a backslash character (\) to escape another backslash character that is between double quotes. Consequently, in the following command, the Bash would replace the \\ with a single backslash, the CLI would receive an unescaped backslash character, and this would result in a syntax error:
dnicli -i INST1 -ou SYSOU -s DNI_SYSADM -c "cre -ct CT\\_1"
The correct syntax would require four backslash characters:
dnicli -i INST1 -ou SYSOU -s DNI_SYSADM -c "cre -ct CT\\\\_1"