From owner-freebsd-hackers Thu Jan 2 15:17:33 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B18F37B401 for ; Thu, 2 Jan 2003 15:17:32 -0800 (PST) Received: from clover.kientzle.com (user-112uh9a.biz.mindspring.com [66.47.69.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7989643EC5 for ; Thu, 2 Jan 2003 15:17:31 -0800 (PST) (envelope-from kientzle@acm.org) Received: from acm.org (c43 [66.47.69.43]) by clover.kientzle.com (8.11.3/8.11.3) with ESMTP id h02NGsE35538; Thu, 2 Jan 2003 15:16:55 -0800 (PST) (envelope-from kientzle@acm.org) Message-ID: <3E14C866.1040306@acm.org> Date: Thu, 02 Jan 2003 15:16:54 -0800 From: Tim Kientzle Reply-To: kientzle@acm.org User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.6) Gecko/20011206 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Paul Schenkeveld Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Reading rc.conf from C programs? References: <1041540674.3e14a642d30b5@webmail1.isg.siue.edu> <4967.1041540976@critter.freebsd.dk> <20030102230154.A8638@psconsult.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Paul Schenkeveld wrote: > If people think that -q is a good option for printenv, I can come up > with a patch for the standard printenv. Opinions? Some form of unambiguous output from printenv would be nice. I would suggest quoting both the variable name and the value just to be on the safe side. Even better: modify 'env' to support that format as input. Then you could use, e.g., printenv -q >saved_environment to record the environment and then use env - -r saved_environment to recreate that environment. Tim Kientzle To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message