Understanding the CLI Scripting Commands

While batch commands are sufficient for the simplest of operations, it can be tedious to wrap in programmatic logic. For example, if you want to get information on the space usage for every share, you must have many different invocations of the CLI, wrapped in a higher level language on the client that parsed the output of specific commands. This results in slow, brittle automation infrastructure. To allow for faster and most robust automation, the appliance has a rich scripting environment based on ECMAScript 3. An ECMAScript tutorial is beyond the scope of this document, but it is a dynamically typed language with a C-like syntax that allows for:

  • Conditional code flow (if/else)

  • Iterative code flow (while, for, and so on)

  • Structural and array data manipulation via first-class Object and Array types

  • Perl-like regular expressions and string manipulation (split(), join(), and so on)

  • Exceptions

  • Sophisticated functional language features, like closures