|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (9)
View Page History{gliffy:name=Petals_CLI_Use_Cases|align=left|size=L|version=4}
{section}
{column}
{column}
h1. Use Cases
{gliffy:name=Petals_CLI_Use_Cases|align=center|size=L|version=4}
h1. Usage of Petals CLI
* The attribute {{lastErrorCode}} is an argument of the command {{exit}} to return the return code of the last executed command.
h2. Exit from the 'console' mode
To exit the 'console' mode, use the command '{{{*}exit{*}}}'. If a number is set as argument, it is used as return code otherwise, the return code 0 is used.
{code}
> ./petals-cli.sh -C
Type 'help' for help.
------------------------------------------------------------------------------
petals-cli> exit
> echo $?
0
> ./petals-cli.sh -C
Type 'help' for help.
------------------------------------------------------------------------------
petals-cli> exit 1
> echo $?
1
{code}
{code}
> ./petals-cli.sh -C
Type 'help' for help.
------------------------------------------------------------------------------
petals-cli> exit
> echo $?
0
> ./petals-cli.sh -C
Type 'help' for help.
------------------------------------------------------------------------------
petals-cli> exit 1
> echo $?
1
{code}
h1. Connection to a Petals node
h1. Petals CLI commands
h1. Administration Commands
h2. Working with JBI artifacts
** Its target component ((displayed using its JBI identifier)
h2. Command '{{exit}}'
h3. Exit the mode 'console'
To exit the mode 'console', use the command '{{{*}exit{*}}}'. If a number is set as argument, it is used as return code otherwise, the return code 0 is used:
{code}
> ./petals-cli.sh -C
Type 'help' for help.
------------------------------------------------------------------------------
petals-cli> exit
> echo $?
0
> ./petals-cli.sh -C
Type 'help' for help.
------------------------------------------------------------------------------
petals-cli> exit 1
> echo $?
1
{code}
h3. Exit the mode 'console'
To exit the mode 'console', use the command '{{{*}exit{*}}}'. If a number is set as argument, it is used as return code otherwise, the return code 0 is used:
{code}
> ./petals-cli.sh -C
Type 'help' for help.
------------------------------------------------------------------------------
petals-cli> exit
> echo $?
0
> ./petals-cli.sh -C
Type 'help' for help.
------------------------------------------------------------------------------
petals-cli> exit 1
> echo $?
1
{code}
h3. Interrupting a flow of commands
h2. Working with the Container
h3. Getting the versions of the a Petals node
To get the version of Petals node, the version of the JVM running Petals node, and its operating system, use the command '{{{*}version{*}}}':