From owner-freebsd-bugs Wed Aug 25 15:11:42 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 5D891152CE for ; Wed, 25 Aug 1999 15:11:38 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id PAA34405; Wed, 25 Aug 1999 15:10:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Wed, 25 Aug 1999 15:10:02 -0700 (PDT) Message-Id: <199908252210.PAA34405@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: James Howard Subject: Re: bin/13363: Patch to env(1) for Unix 98 compatability Reply-To: James Howard Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/13363; it has been noted by GNATS. From: James Howard To: Sheldon Hearn Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/13363: Patch to env(1) for Unix 98 compatability Date: Wed, 25 Aug 1999 17:57:56 -0400 (EDT) Due to the sheer number of complaints about my style here is a new patch for env which should make everyone happy :) Following it is a diff to printenv.1. --- /usr/src/usr.bin/env/env.c Sun Dec 6 17:58:22 1998 +++ env.c Wed Aug 25 17:45:39 1999 @@ -60,8 +60,9 @@ char *cleanenv[1]; int ch; - while ((ch = getopt(argc, argv, "-")) != -1) + while ((ch = getopt(argc, argv, "i-")) != -1) switch(ch) { + case 'i': case '-': environ = cleanenv; cleanenv[0] = NULL; @@ -85,6 +86,6 @@ usage() { (void)fprintf(stderr, - "usage: env [-] [name=value ...] [command]\n"); + "usage: env [-] [-i] [name=value ...] [command]\n"); exit(1); } ------------CUT HERE----------------- --- /usr/src/usr.bin/printenv/printenv.1 Mon Jul 12 16:23:52 1999 +++ printenv.1 Wed Aug 25 17:45:42 1999 @@ -45,6 +44,7 @@ .Op Ar name .Nm env .Op Fl +.Op Fl i .Op Ar name=value ... .Op Ar command .Sh DESCRIPTION @@ -72,12 +72,20 @@ .Ar name , with a value of .Ar value . -The option -.Sq Fl -causes +The options to +.Nm env +are as follows: +.Pp +.Bl -tag -width indent +.It Fl +Force .Nm env to completely ignore the environment it inherits. +.It Fl i +Equivalent to +.Fl . +.El .Pp If no command is specified, .Nm env To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message