Cyclades AlterPath BladeManager Instrukcja Obsługi Strona 161

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 240
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 160
Chapter 7: Using the cli Utility 147
Example cli shell script
Start the script by entering #!/usr/bin/cli with the
-CF options.
You could then make the script executable and execute it on the command line, as shown in
the following example.
Example bash shell script
If you want to run a cli command from the same script that is running other Linux commands, you
could put the command in another type of shell script. The bash shell is shown in the
following example.
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.
You could then make the script executable and execute it on the command line, as shown in the
following screen example.
#!/usr/bin/cli -CF
set network interface failover yes
[root@MergePoint5224 /]# chmod 777 scriptname1
[root@MergePoint5224 /]# ./scriptname1
#!/bin/bash
...
/usr/bin/cli -CF -- set network interface failover yes
...
#!/bin/bash
...
/usr/bin/cli << EOF
set network interface failover yes
set network hostname frutabaga
commit
EOF
[root@MergePoint5224 /]# chmod 777 scriptname2
[root@MergePoint5224 /]# ./scriptname2
Przeglądanie stron 160
1 2 ... 156 157 158 159 160 161 162 163 164 165 166 ... 239 240

Komentarze do niniejszej Instrukcji

Brak uwag