Configuring the UNIX Session-based CLI adapter
In a UNIX environment, you provide the initial command as a Telnet command, which opens a sub-shell. Subsequent commands execute in the sub-shell in a session. You can specify the command at the command level or at the command-group level.
The console prompt appears when the system is waiting for a command. This prompt indicates that a command has been executed.
The following figure shows a sample configuration of the UNIX Session-based CLI adapter with prompt.
XML sample of the Session-based CLI adapter configuration with prompt for UNIX
<config>
<initial-command>
<command prompt="password:">telnet -l username -a hostname</command>
<command prompt="$">test</command>
</initial-command>
<prompt>$</prompt>
</config>
The following figure shows a sample configuration of the UNIX Session-based CLI adapter with expect.
XML sample of the Session-based Command Line configuration with expect for UNIX
<config>
<initial-command>
<command expect="password:">telnet -l username -a hostname</command>
<command expect="$">test</command>
</initial-command>
<expect>$</expect>
</config>
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*