Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: Chris Faylor Date: Tue, 8 Aug 2000 10:49:30 -0400 To: cygwin AT sources DOT redhat DOT com Subject: Re: Some comment about Cygwin1.1.4 Message-ID: <20000808104930.A20556@cygnus.com> Reply-To: cygwin AT sources DOT redhat DOT com Mail-Followup-To: cygwin AT sources DOT redhat DOT com References: <85256935 DOT 004FED39 DOT 00 AT nyc-ntgw-n01 DOT ny DOT jpmorgan DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.6i In-Reply-To: <85256935.004FED39.00@nyc-ntgw-n01.ny.jpmorgan.com>; from yap_noel@jpmorgan.com on Tue, Aug 08, 2000 at 10:33:00AM -0400 On Tue, Aug 08, 2000 at 10:33:00AM -0400, Noel L Yap wrote: >What's the behaviour of this when running csh or tcsh? Who knows? Who cares? This is intended to distinguish between ash and bash. cgf >cgf AT cygnus DOT com on 2000.08.08 10:19:52 > >Please respond to cygwin AT sources DOT redhat DOT com > >To: cygwin AT sources DOT redhat DOT com >cc: dj AT cygnus DOT com (bcc: Noel L Yap) >Subject: Re: Some comment about Cygwin1.1.4 > > > > >I usually do something like: > >(alias a=b) >/dev/null 2>&1 && echo "we're running bash" > >to detect which shell is in use. > >cgf > >On Tue, Aug 08, 2000 at 12:08:43PM +0200, Christian J?nsson wrote: >>What about trying to execute "display-shell-version (C-x C-v)". If >>we're in a bash shell, we'd get the verision info (works on both >>bash1 and bash2) and I suppose that if we're on (a)sh we'd get nothing. >> >>Cheers, >> >>/ChJ >> >> >>Bob McGowan wrote: >>> >>> DJ Delorie wrote: >>> > >>> > > echo $BASH_VERSION ? >>> > >>> > No, because if you run sh from bash, it may inherit that environment >>> > variable. >>> >>> By default, it should not be exported, but a user could export it >>> themselves. >>> >>> How about a double check of RANDOM? If it gets exported, the inherited >>> value in (a)sh appears to be constant, while in bash it changes with >>> each access. The only problem I can see with this is that a user could >>> unset RANDOM, then make a new variable with that name, but which will >>> not have the special feature. I would think that this is rare enough to >>> maybe be ignored? -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com