View | Details | Raw Unified | Return to bug 65649
Collapse All | Expand All

(-)env.c (-2 / +5 lines)
Lines 64-76 Link Here
64
	char *cleanenv[1];
64
	char *cleanenv[1];
65
	int ch;
65
	int ch;
66
66
67
	while ((ch = getopt(argc, argv, "-i")) != -1)
67
	while ((ch = getopt(argc, argv, "-iu:")) != -1)
68
		switch(ch) {
68
		switch(ch) {
69
		case '-':
69
		case '-':
70
		case 'i':
70
		case 'i':
71
			environ = cleanenv;
71
			environ = cleanenv;
72
			cleanenv[0] = NULL;
72
			cleanenv[0] = NULL;
73
			break;
73
			break;
74
		case 'u':
75
			unsetenv(optarg);
76
			break;
74
		case '?':
77
		case '?':
75
		default:
78
		default:
76
			usage();
79
			usage();
Lines 90-95 Link Here
90
usage(void)
93
usage(void)
91
{
94
{
92
	(void)fprintf(stderr,
95
	(void)fprintf(stderr,
93
	    "usage: env [-i] [name=value ...] [utility [argument ...]]\n");
96
	    "usage: env [-i] [[-u name] ...] [name=value ...] [utility [argument ...]]\n");
94
	exit(1);
97
	exit(1);
95
}
98
}
(-)env.1 (+9 lines)
Lines 44-49 Link Here
44
.Sh SYNOPSIS
44
.Sh SYNOPSIS
45
.Nm
45
.Nm
46
.Op Fl i
46
.Op Fl i
47
.Op Fl u Ar name
47
.Op Ar name Ns = Ns Ar value ...
48
.Op Ar name Ns = Ns Ar value ...
48
.Op Ar utility Op Ar argument ...
49
.Op Ar utility Op Ar argument ...
49
.Sh DESCRIPTION
50
.Sh DESCRIPTION
Lines 71-76 Link Here
71
by
72
by
72
.Nm
73
.Nm
73
is ignored completely.
74
is ignored completely.
75
.It Fl u Ar name
76
Execute the
77
.Ar utility
78
with
79
.Ar name
80
removed from the environment,
81
if it was present in the environment inherited by
82
.Nm  .
74
.El
83
.El
75
.Pp
84
.Pp
76
If no utility is specified,
85
If no utility is specified,

Return to bug 65649