If you are creating scripts that use ldm list command output, always use the -p option to produce the machine-readable form of the output. See Generate a Parseable, Machine-Readable List (-p) for more information.
Look at syntax usage for all ldm subcommands.
primary# ldm --help
For more information about the ldm subcommands, see the ldm(1M) man page.