Sort options.
ok wiz@
This commit is contained in:
parent
e345d25606
commit
1a4cb94e52
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: who.1,v 1.14 2003/08/07 11:17:18 agc Exp $
|
||||
.\" $NetBSD: who.1,v 1.15 2004/11/22 17:20:02 peter Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1986, 1991, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -37,7 +37,7 @@
|
||||
.Nd display who is logged in
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl mTuH
|
||||
.Op Fl HmTu
|
||||
.Op Ar file
|
||||
.Nm
|
||||
.Ar am i
|
||||
@ -51,6 +51,8 @@ hostname if not local.
|
||||
Available options:
|
||||
.Pp
|
||||
.Bl -tag -width file
|
||||
.It Fl H
|
||||
Write column headings above the regular output.
|
||||
.It Fl m
|
||||
Only print information about the current terminal.
|
||||
This is the
|
||||
@ -70,8 +72,6 @@ and
|
||||
if a bad line is encountered.
|
||||
.It Fl u
|
||||
Print the idle time for each user.
|
||||
.It Fl H
|
||||
Write column headings above the regular output.
|
||||
.It Ar \&am I
|
||||
Returns the invoker's real user name.
|
||||
.It Ar file
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: who.c,v 1.13 2004/01/05 23:23:37 jmmv Exp $ */
|
||||
/* $NetBSD: who.c,v 1.14 2004/11/22 17:20:02 peter Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT(
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)who.c 8.1 (Berkeley) 6/6/93";
|
||||
#endif
|
||||
__RCSID("$NetBSD: who.c,v 1.13 2004/01/05 23:23:37 jmmv Exp $");
|
||||
__RCSID("$NetBSD: who.c,v 1.14 2004/11/22 17:20:02 peter Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -79,8 +79,11 @@ main(int argc, char **argv)
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
only_current_term = show_term = show_idle = show_labels = 0;
|
||||
while ((c = getopt(argc, argv, "mTuH")) != -1) {
|
||||
while ((c = getopt(argc, argv, "HmTu")) != -1) {
|
||||
switch (c) {
|
||||
case 'H':
|
||||
show_labels = 1;
|
||||
break;
|
||||
case 'm':
|
||||
only_current_term = 1;
|
||||
break;
|
||||
@ -90,9 +93,6 @@ main(int argc, char **argv)
|
||||
case 'u':
|
||||
show_idle = 1;
|
||||
break;
|
||||
case 'H':
|
||||
show_labels = 1;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
/* NOTREACHED */
|
||||
@ -246,7 +246,7 @@ output_labels()
|
||||
static void
|
||||
usage()
|
||||
{
|
||||
(void)fprintf(stderr, "usage: %s [-mTuH] [ file ]\n %s am i\n",
|
||||
(void)fprintf(stderr, "usage: %s [-HmTu] [file]\n %s am i\n",
|
||||
getprogname(), getprogname());
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user