From owner-freebsd-questions Fri May 8 10:38:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA29768 for freebsd-questions-outgoing; Fri, 8 May 1998 10:38:45 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from jason03.u.washington.edu (root@jason03.u.washington.edu [140.142.77.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA29721 for ; Fri, 8 May 1998 10:38:27 -0700 (PDT) (envelope-from jcwells@u.washington.edu) Received: from saul6.u.washington.edu (root@saul6.u.washington.edu [140.142.82.1]) by jason03.u.washington.edu (8.8.4+UW97.07/8.8.4+UW97.05) with ESMTP id KAA11552; Fri, 8 May 1998 10:38:27 -0700 Received: from s8-37-26.student.washington.edu (S8-37-26.student.washington.edu [128.208.37.26]) by saul6.u.washington.edu (8.8.4+UW97.07/8.8.4+UW97.04) with SMTP id KAA30796; Fri, 8 May 1998 10:38:26 -0700 (PDT) Date: Fri, 8 May 1998 10:36:56 +0000 (GMT) From: "Jason C. Wells" X-Sender: jason@s8-37-26.student.washington.edu To: flygt@sr.se cc: questions@FreeBSD.ORG Subject: Re: shellscript In-Reply-To: <19980508135719.60843@sr.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 8 May 1998, Gunnar Flygt wrote: >Is there (of course there is but, how) a smart way of setting an >environment variable that is one value when not using X and another when the >shell script is run from X? example: when not running in X one may want >$TERM=vt220 and when running in X $TERM=xterm-color. The shell used is bash. Yes. See 'man bash'. There are two rc files for bash. One is called '.bash_profile' for login shells and the the other is called '.bashrc' for non-loging shells such as an xterm. Thank you, | Try some of this. It will show you where you're at. Jason Wells | http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message