Dell Acceleration Appliances for Databases Guide de l'utilisateur Page 18

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 156
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 17
Piping Output
You can also pipe the text output of one command into another, using the piping symbol (“|”).
For example,
config:config | more will page through the configuration one screen at a time.
A convenient pipe command is
grep, which allows searching for values. For example:
luns -dt | grep some_volume
Filtering Output
The CLI enables a number of useful forms of filtering. Here are some sample expressions that can
guide your use:
Get port objects and store them:
> p=(ports -o) // grab port objects and store
Return a list of the modes of the ports:
> each $p {$1 mode} // get mode property
Return a list of booleans indicating which ports are not management ports:
> each $p {$1 . mode . neq Management}
Filter the ports, returning the ones that are management ports:
> each $p -w { $1 . mode . eq Management}
Filter the ports, returning a list of the IDs of the ones that are management ports:
> each $p -w { $1 . mode . eq Management} {$1 id}
Using Closures and Subcommands
A closure is created by surrounding statement(s) with braces. This forms a function, which can be
used directly or assigned to a variable. Within a closure you can refer to any positional argument
by $n, where n is the number of the argument, starting with 1. $args refers to all the arguments
passed to the function.
admin@url> each (volumes) {volume:get $1}
vol1
vol2
...
You can use closures to create functions, by assigning the closure to a variable name. Once
created you can refer to the closure value by using the $ symbol, or can invoke the closure by
referring to the variable without the $ sign.
18
Vue de la page 17
1 2 ... 13 14 15 16 17 18 19 20 21 22 23 ... 155 156

Commentaires sur ces manuels

Pas de commentaire