diff options
author | mini <mini@FreeBSD.org> | 2002-07-02 08:00:20 +0000 |
---|---|---|
committer | mini <mini@FreeBSD.org> | 2002-07-02 08:00:20 +0000 |
commit | 712f956e9e0dbe86568da5bc27fb0a75c38b84e1 (patch) | |
tree | 7246b8e210a907ac2095a88d0fe80e7eb1a1f7b9 /usr.bin/finger/lprint.c | |
parent | 3480b426f56630106d09d39b69abfba723b845df (diff) | |
download | FreeBSD-src-712f956e9e0dbe86568da5bc27fb0a75c38b84e1.zip FreeBSD-src-712f956e9e0dbe86568da5bc27fb0a75c38b84e1.tar.gz |
Add -g option, which restricts printing of the gecos fields to just the user's
real name.
PR: bin/39462
Submitted by: Mike Makonnen <makonnen@pacbell.net>
Obtained from: NetBSD
MFC after: 1 week
Diffstat (limited to 'usr.bin/finger/lprint.c')
-rw-r--r-- | usr.bin/finger/lprint.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/finger/lprint.c b/usr.bin/finger/lprint.c index f55b6d4..20b0306 100644 --- a/usr.bin/finger/lprint.c +++ b/usr.bin/finger/lprint.c @@ -127,6 +127,8 @@ lprint(pn) pn->name, pn->realname, pn->dir); (void)printf("\tShell: %-s\n", *pn->shell ? pn->shell : _PATH_BSHELL); + if (gflag) + goto no_gecos; /* * try and print office, office phone, and home phone on one line; * if that fails, do line filling so it looks nice. @@ -160,6 +162,7 @@ lprint(pn) if (oddfield) putchar('\n'); +no_gecos: /* * long format con't: * if logged in |