Data for each column is left-aligned with at least one space between columns. Numeric data might be right-aligned.

The -Dargument allows you to specify a delimiter character when scripting. This is very useful in parsing fields with white space.

If all lines have the same number and type of data values, each row is printed to a separate line so variable data can be parsed easily. For example, executing access get users -g monitor returns a list of monitor users each on a separate line.

Commands that return multiple columns (such as inventory get hardware) may have a minimal default set of columns and a --verboseargument to display all columns. Some commands include arguments that allow you to select specific columns to output.

Other Tips For Best Results

Externalize the set of SP IP addresses into a file to be shared across all of your scripts.

Consider using a script to create the initial manager account and upload its public key on your SPs.

Test the output and return codes of each command manually by using SSH to log in to the SP and run the commands individually.

Test your scripts on a single staging machine before applying them to your remaining machines.

To configure all of your SPs identically, consider configuring a single SP and then using the sp load settings command to synchronize that configuration on the remaining machines.

Note – If running the script from the SP, there are a limited number of commands (not a full bash environment).

62 Sun Fire V20z and Sun Fire V40z Servers, Server Management Guide • May, 2004

Page 84
Image 84
Sun Microsystems V20Z, V40z manual Other Tips For Best Results