From owner-freebsd-questions@FreeBSD.ORG Tue Jun 15 02:03:29 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36E6A16A4CE for ; Tue, 15 Jun 2004 02:03:29 +0000 (GMT) Received: from outfbmx005.isp.belgacom.be (outfbmx005.isp.belgacom.be [195.238.3.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AF6C43D2F for ; Tue, 15 Jun 2004 02:03:28 +0000 (GMT) (envelope-from geert@lori.mine.nu) Received: from outmx006.isp.belgacom.be (outmx006.isp.belgacom.be [195.238.2.99]) (8.12.11/8.12.11/Skynet-OUT-FALLBACK-2.22) with ESMTP id i5ENX0Qd032477 for ; Tue, 15 Jun 2004 01:33:05 +0200 (envelope-from ) Received: from outmx006.isp.belgacom.be (localhost [127.0.0.1]) with ESMTP id i5ENWuka030367 for ; Tue, 15 Jun 2004 01:32:56 +0200 (envelope-from ) Received: from lori.mine.nu (160-18.244.81.adsl.skynet.be [81.244.18.160]) with ESMTP id i5ENWobb030324 for ; Tue, 15 Jun 2004 01:32:50 +0200 (envelope-from ) Received: by lori.mine.nu (Postfix, from userid 1000) id 750253E5; Tue, 15 Jun 2004 01:32:49 +0200 (CEST) Date: Tue, 15 Jun 2004 01:32:49 +0200 From: Geert Hendrickx To: freebsd-questions@freebsd.org Message-ID: <20040614233248.GA91837@lori.mine.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-GPG-Key: http://www.win.ua.ac.be/~s005085/gnupgkey.txt X-GPG-Key-ID: 1024D/766C1E92 X-Accept-Language: nl,en Subject: setting variables in tcsh temporarily X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 02:03:29 -0000 Hi, I have this simple question regarding the tcsh: in /bin/sh (Bourne shell) I can assign a value to an environment variable for just one command, like this: VARIABLE=value e.g. "DISPLAY=:0 xterm" or "CFLAGS=O2 make". Can this be done with tcsh as well? The only thing I can think of is this: ( setenv VARIABLE value ; ) thus invoking a subshell, because for example the multiline variant setenv DISPLAY :0 xterm unsetenv DISPLAY "forgets" the (possible) original value of the variable. Thanks for any hints, this is the only Bourne-shell feature I'm missing in the C-shell. GH