Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Whip me. Beat me. Make me maintain AIX. -- Stephan Zielinski


devel / comp.unix.shell / Re: how to capture only 7 or 8 in /etc/redhat-release

SubjectAuthor
* Re: how to capture only 7 or 8 in /etc/redhat-releaseDavid W. Hodgins
`- Re: how to capture only 7 or 8 in /etc/redhat-releaseBit Twister

1
Re: how to capture only 7 or 8 in /etc/redhat-release

<op.152qppawa3w0dxdave@hodgins.homeip.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6315&group=comp.unix.shell#6315

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dwhodg...@nomail.afraid.org (David W. Hodgins)
Newsgroups: comp.unix.shell
Subject: Re: how to capture only 7 or 8 in /etc/redhat-release
Date: Mon, 05 Jun 2023 12:28:27 -0400
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <op.152qppawa3w0dxdave@hodgins.homeip.net>
References: <c617ead2-f74c-442a-a072-2e5d620ad183n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="d2a1761aceede45a7fd74bbbe7cac1d7";
logging-data="416517"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/kUE3bzN5kiWXK87GsZHDtxvETpSca+vg="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:lPSvilYi6g8FJwC2YervOn4FE5M=
 by: David W. Hodgins - Mon, 5 Jun 2023 16:28 UTC

On Mon, 05 Jun 2023 08:23:27 -0400, Neeraj Kumar <neeraj.friendslover@gmail.com> wrote:

> I have two version; please help me to get the version in the form of 7 or 8

Why use /etc/redhat-release? /etc/lsb-release is more likely to be found in
various distributions, and is easier to parse in bash.

$ . /etc/lsb-release
$ echo $DISTRIB_RELEASE
8 $ echo $DISTRIB_ID
Mageia

Regards, Dave Hodgins

Re: how to capture only 7 or 8 in /etc/redhat-release

<slrnu7s60v.k27g.BitTwister@wb.home.arpa>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6317&group=comp.unix.shell#6317

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: BitTwis...@mouse-potato.com (Bit Twister)
Newsgroups: comp.unix.shell
Subject: Re: how to capture only 7 or 8 in /etc/redhat-release
Date: Mon, 5 Jun 2023 12:15:06 -0500
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <slrnu7s60v.k27g.BitTwister@wb.home.arpa>
References: <c617ead2-f74c-442a-a072-2e5d620ad183n@googlegroups.com>
<op.152qppawa3w0dxdave@hodgins.homeip.net>
Injection-Info: dont-email.me; posting-host="51238b7fca1923e8930836229f59e28c";
logging-data="425391"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+cbWrxFeAleiFXRTUEmMCdVXF/Q3+uEQc="
User-Agent: slrn/pre1.0.4-6 (Linux)
Cancel-Lock: sha1:ZD4nbnk9yoI49qkldXGmK38VRqo=
 by: Bit Twister - Mon, 5 Jun 2023 17:15 UTC

On Mon, 05 Jun 2023 12:28:27 -0400, David W. Hodgins wrote:
> On Mon, 05 Jun 2023 08:23:27 -0400, Neeraj Kumar <neeraj.friendslover@gmail.com> wrote:
>
>> I have two version; please help me to get the version in the form of 7 or 8
>
> Why use /etc/redhat-release? /etc/lsb-release is more likely to be found in
> various distributions, and is easier to parse in bash.
>
> $ . /etc/lsb-release
> $ echo $DISTRIB_RELEASE
> 8
> $ echo $DISTRIB_ID
> Mageia
>
> Regards, Dave Hodgins

Or the op could do something like
$ . /etc/os-release
$ echo $VERSION
or
$ echo $VERSION_ID

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor