</listitem>
</varlistentry>
+ <varlistentry><term>-X</term>
+ <listitem>
+ <para>
+ Produce output in machine readable form for easier parsing
+ by scripts. This uses a field delimiter of '|'. Not all
+ commands support this option.
+ </para>
+ <para>
+ This is equivalent to "-x|" and avoids some shell quoting
+ issues.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry><term>-t <parameter>TIMEOUT</parameter></term>
<listitem>
<para>
{
struct ctdb_context *ctdb;
char *nodestring = NULL;
+ int machineparsable = 0;
struct poptOption popt_options[] = {
POPT_AUTOHELP
POPT_CTDB_CMDLINE
{ "node", 'n', POPT_ARG_STRING, &nodestring, 0, "node", "integer|all" },
{ "machinereadable", 'Y', POPT_ARG_NONE, &options.machinereadable, 0, "enable machine readable output", NULL },
{ NULL, 'x', POPT_ARG_STRING, &options.machineseparator, 0, "specify separator for machine readable output", "char" },
+ { NULL, 'X', POPT_ARG_NONE, &machineparsable, 0, "enable machine parsable output with separator |", NULL },
{ "verbose", 'v', POPT_ARG_NONE, &options.verbose, 0, "enable verbose output", NULL },
{ "maxruntime", 'T', POPT_ARG_INT, &options.maxruntime, 0, "die if runtime exceeds this limit (in seconds)", "integer" },
{ "print-emptyrecords", 0, POPT_ARG_NONE, &options.printemptyrecords, 0, "print the empty records when dumping databases (catdb, cattdb, dumpdbbackup)", NULL },
}
}
+ if (machineparsable) {
+ options.machineseparator = "|";
+ }
if (options.machineseparator != NULL) {
if (strlen(options.machineseparator) != 1) {
printf("Invalid separator \"%s\" - "