* Copyright (c) 1987 Regents of the University of California.
* %sccs.include.redist.c%
"@(#) Copyright (c) 1987 Regents of the University of California.\n\
static char sccsid
[] = "@(#)printenv.c 5.5 (Berkeley) %G%";
while ((ch
= getopt(argc
, argv
, "")) != EOF
)
for (ep
= environ
; *ep
; ep
++)
(void)printf("%s\n", *ep
);
for (ep
= environ
; *ep
; ep
++)
if (!memcmp(*ep
, *argv
, len
)) {
if (!*cp
|| *cp
== '=') {
(void)printf("%s\n", *cp
? cp
+ 1 : cp
);
(void)fprintf(stderr
, "usage: printenv [name]\n");