2 * getfullname.c - Extract a user's name out of the GECOS field in
5 * This code is Copyright (c) 2012, by the authors of nmh. See the
6 * COPYRIGHT file in the root directory of the nmh distribution for
7 * complete copyright information.
13 #include <sys/types.h>
17 main(int argc, char *argv[])
21 pwd = getpwuid(getuid());
24 fprintf(stderr, "Unable to retrieve user info for "
25 "userid %d\n", getuid());
29 printf("%s\n", pwd->pw_gecos);