tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ exit code

Remove lines from stdin ▻

Help with function to check if Bash version >= 2

In article <slrn88fuft.1rf.ken@pulsar.halcyon.com>,
Ken Pizzini <ken@halcyon.com> wrote:
>I notice that rc is omitted from this script; the patch below is
>a quick correction to this oversight

Thanks!

>                                     (it does not distinguish
>between different implementations/revisions of rc).

In recent beta releases of Byron Rakitzis's (the open source) rc,
`$version(1)' contains the release identifier.  However, this rc is
averaging about 1 new feature every 2 years at present: `$version' is
mostly there to make bug reporting more useful.

To distinguish between this rc and the Bell Labs version, try something
like this.  (Untested, as I don't actually have a Bell Labs rc!)

    x=`{true}
    test $#bqstatus '=' 2 && echo RC_OPEN || echo RC_BELL

Tim.
--
Tim Goodwin   | "If you don't know what closures are, you probably don't
Leicester, UK | want to know what closures are." -- Larry Wall

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: Help with function to check if Bash version >= 2
Date: 21 Jan 2000 12:31:57 -0000
Message-ID: <869jkj$m4m$1@ltpcg.star.le.ac.uk>
References: <38839F7C.21416362@uci.edu>
  <slrn885n63.e7.ken@pulsar.halcyon.com> <s8fk7239eh662@corp.supernews.com>
  <slrn88fuft.1rf.ken@pulsar.halcyon.com>

△ comp.unix.shell △

◅ exit code

Remove lines from stdin ▻