Avocent MERGEPOINT 53XX SP MANAGER User's Guide Page 137

  • Download
  • Add to my manuals
  • Print
  • Page
    / 236
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 136
/usr/bin/cli -C set network interface mode failover
...
If you want to run multiple CLI commands from a script that is also running other Linux
commands, you could add the multiple CLI commands as shown in the following example:
#!/bin/bash
...
/usr/bin/cli <<EOF
set network interface mode failover
set network hostname frutabaga
commit
EOF
You could then make the script executable and execute it on the command line, as shown in
the following example:
root@MergePoint:~$ chmod 777 scriptname2
root@MergePoint:~$ ./scriptname2
Example plain text file
You can put one or more commands in a plain text file without invoking any shell as shown in
the following example.
set network interface mode failover
Then you can invoke the CLI command with the -f <file> option to execute the command(s)
from the file, as shown in the following example.
root@MergePoint:~$ cli -f filename
Autocompletion
Autocompletion can be used to find out what commands and parameters are available. Pressing
the Tab key twice displays all the commands at the top level, as shown in the following screen
example.
cli> <Tab><Tab>
add commit exit list rename set show
cd delete get quit revert shell version
Typing any of the commands such as add or set then pressing Tab twice displays all the top
level parameters, as shown in the following screen example.
cli> set<Tab><Tab>
adsap2 cards network snmpd syslog
auth dhcpd ntp spmanager timezone
Chapter 7: Using the CLI Utility 125
Page view 136
1 2 ... 132 133 134 135 136 137 138 139 140 141 142 ... 235 236

Comments to this Manuals

No comments