4efe139ec75ee444809f9df43582368e3cd234a1
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
* %sccs.include.redist.c%
static char copyright
[] =
"@(#) Copyright (c) 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n";
static char sccsid
[] = "@(#)env.c 8.1 (Berkeley) %G%";
extern int errno
, optind
;
while ((ch
= getopt(argc
, argv
, "-")) != EOF
)
"usage: env [-] [name=value ...] [command]\n");
for (argv
+= optind
; *argv
&& (p
= index(*argv
, '=')); ++argv
)
(void)setenv(*argv
, ++p
, 1);
(void)fprintf(stderr
, "env: %s: %s\n", *argv
,
for (ep
= environ
; *ep
; ep
++)
(void)printf("%s\n", *ep
);