System Automation the Groovy Way • 343
MaxLOut = mshExec('display database $1.$2;', ['Sample','Basic']) //
passing in args
parseMaxLDisplayX(MaxLOut).each{ println "Sample.Basic has ${it.
number_dimensions} dimensions!" }
MaxLOut = mshExec('display application all;',[]) // multi-item
display
parseMaxLDisplayX(MaxLOut).each{ println "${it.application} has
${it.number_of_databases} database(s)!" }
Included here is a function that parses the output from MaxL “display” commands
and returns a list of maps. Each map in the list contains key-value pairs drawn from the
text table embedded in MaxL’s output string. e parsing function is useful for either
technique of running MaxL commands.
9.5.11 Using Command Line Arguments and Cong File Settings
Ma