delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/11/05:44:51

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Tue, 11 Sep 2001 10:44:32 +0100
Message-ID: <7996-Tue11Sep2001104432+0100-starksb@ebi.ac.uk>
X-Mailer: emacs 20.7.1 (via feedmail 9-beta-7 I);
VM 6.92 under Emacs 20.7.1
From: David Starks-Browning <starksb AT ebi DOT ac DOT uk>
MIME-Version: 1.0
To: Corinna Vinschen <cygwin AT cygwin DOT com>
Subject: output allowed in .bashrc and .tcshrc (Was: Virus Found)
In-Reply-To: <20010911111946.A1285@cygbert.vinschen.de>
References: <20010911004146 DOT H937 AT cygbert DOT vinschen DOT de>
<8F23E55D511AD5119A6800D0B76FDDE101A26A59 AT cpex3 DOT channelpoint DOT com>
<59jqpt4f25eochmtlslvv9nodngnkeeo3d AT 4ax DOT com>
<5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20010911020929 DOT 00ac0fc0 AT imap DOT local DOT mscha DOT com>
<20010911111946 DOT A1285 AT cygbert DOT vinschen DOT de>

On Tuesday 11 Sep 01, Corinna Vinschen writes:
> ... If your login shell is bash and bash has been started by
> rshd/sshd, it executes ~/.bashrc.  So the rule is, no output in
> ~/.bashrc.
> 
> And, IIRC, the same rule applies for tcsh and ~/.cshrc.

Just to be precise and complete...

That's almost correct.  Your *are* allowed to generate output in
.bashrc (and in .cshrc for tcsh) for *interactive* shells only.  The
usual way to test is to check for the existence of a prompt.  ($PS1 in
bash, $prompt in tcsh.)  If no prompt is defined, you must not
generate *any* output.

Hope this helps.

Regards,
David


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019