explicitly define expected columns by using \fB\-\-output\fR.
.SH OPTIONS
.TP
+.BR \-n , " \-\-noheadings
+Don't print headings.
+.TP
.BR \-o , " \-\-output " \fIlist\fP
Specify which output columns to print. Use \fB\-\-help\fR to get a list of all supported columns.
The default list of columns may be extended if list is specified in the format +list.
names.
.TP
.BR \-J , " \-\-json
-Update interrupt output every
+Use JSON output format.
.TP
.BR \-V ", " \-\-version
Display version information and exit.
fputs(USAGE_OPTIONS, stdout);
fputs(_(" -J, --json use JSON output format\n"), stdout);
+ fputs(_(" -n, --noheadings don't print headings\n"), stdout);
fputs(_(" -o, --output <list> define which output columns to use\n"), stdout);
fputs(_(" -s, --sort <column> specify sort column\n"), stdout);
fputs(USAGE_SEPARATOR, stdout);
};
static const struct option longopts[] = {
{"sort", required_argument, NULL, 's'},
+ {"noheadings", no_argument, NULL, 'n'},
{"output", required_argument, NULL, 'o'},
{"json", no_argument, NULL, 'J'},
{"help", no_argument, NULL, 'h'},
setlocale(LC_ALL, "");
- while ((c = getopt_long(argc, argv, "o:s:hJV", longopts, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "no:s:hJV", longopts, NULL)) != -1) {
switch (c) {
case 'J':
out.json = 1;
break;
+ case 'n':
+ out.no_headings = 1;
+ break;
case 'o':
outarg = optarg;
break;