On 05/06/2023 13:23, Neeraj Kumar wrote:
I have two version; please help me to get the version in the form of 7 or 8
grep -o -E "7|8" /etc/redhat-release
--
Chris Elvidge
England
I have two version; please help me to get the version in the form of 7 or 8
On 05/06/2023 13:23, Neeraj Kumar wrote:
I have two version; please help me to get the version in the form of 7 or 8 >>
grep -o -E "7|8" /etc/redhat-release
On Monday, June 5, 2023 at 6:19:02 PM UTC+5:30, Chris Elvidge wrote:
On 05/06/2023 13:23, Neeraj Kumar wrote:
I have two version; please help me to get the version in the form of 7 or 8 >>>grep -o -E "7|8" /etc/redhat-release
--
Chris Elvidge
England
Thank you for the reply..
if the Linux is 8.7 then it will not give proper output.
can we have this by awk command .. I tried multiple but unlucky to get in single line
or shell's expr
On Monday, June 5, 2023 at 6:19:02 PM UTC+5:30, Chris Elvidge wrote:
On 05/06/2023 13:23, Neeraj Kumar wrote:
I have two version; please help me to get the version in the form of 7 or 8grep -o -E "7|8" /etc/redhat-release
--
Chris Elvidge
England
Thank you for the reply..
if the Linux is 8.7 then it will not give proper output.
I have two version; please help me to get the version in the form of 7 or 8
On 2023-06-05, Neeraj Kumar <[email protected]> wrote:[...]
if the Linux is 8.7 then it will not give proper output.
If Linux is 8.7, today can't be 2023. The current stable version is
6.3.6, with a 6.4-rc5 (release candidate 5) on the mainline.
See https://kernel.org
On Mon, 05 Jun 2023 08:23:27 -0400, Neeraj Kumar <[email protected]> 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
I have two version; please help me to get the version in the form of 7 or 8
Kaz Kylheku <[email protected]> writes:
On 2023-06-05, Neeraj Kumar <[email protected]> wrote:[...]
if the Linux is 8.7 then it will not give proper output.
If Linux is 8.7, today can't be 2023. The current stable version is
6.3.6, with a 6.4-rc5 (release candidate 5) on the mainline.
See https://kernel.org
Kaz's point is that Linux (the kernel) and Red Hat (the operating
system) are two different things with different version numbers. /etc/redhat-release has information about the OS.
On 2023-06-05, Keith Thompson <[email protected]> wrote:
Kaz Kylheku <[email protected]> writes:
On 2023-06-05, Neeraj Kumar <[email protected]> wrote:[...]
if the Linux is 8.7 then it will not give proper output.
If Linux is 8.7, today can't be 2023. The current stable version is
6.3.6, with a 6.4-rc5 (release candidate 5) on the mainline.
See https://kernel.org
Kaz's point is that Linux (the kernel) and Red Hat (the operating
system) are two different things with different version numbers.
/etc/redhat-release has information about the OS.
Unlike some, I don't have a problem with Red Hat being called a
"Linux distribution", but when you start talking about it it being
Linux 8.7, we have crossed the blurry line between political
and stupid.
Neeraj Kumar <[email protected]> writes:
I have two version; please help me to get the version in the form of 7 or 8
Please show us the content of /etc/redhat-release.
On 05/06/2023 18:30, Keith Thompson wrote:[SNIP]
Neeraj Kumar <[email protected]> writes:
I have two version; please help me to get the version in the form of 7 or 8 >> Please show us the content of /etc/redhat-release.
This is what I have. They dropped 'Server' for version 8 ...
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
Red Hat Enterprise Linux release 8.4 (Ootpa)
Red Hat Enterprise Linux release 8.6 (Ootpa)
Also, CentOs ...
CentOS Linux release 7.9.2009 (Core)
CentOS Stream release 8
/etc/os-release doesn't seem to exist prior to version 7, and CentOs
Stream dropped the decimal-point - but VERSION_ID is the easiest to
parse.
Richard Harnden <[email protected]> writes:
On 05/06/2023 18:30, Keith Thompson wrote:[SNIP]
Neeraj Kumar <[email protected]> writes:
I have two version; please help me to get the version in the form of 7 or 8Please show us the content of /etc/redhat-release.
This is what I have. They dropped 'Server' for version 8 ...
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
Red Hat Enterprise Linux release 8.4 (Ootpa)
Red Hat Enterprise Linux release 8.6 (Ootpa)
Also, CentOs ...
CentOS Linux release 7.9.2009 (Core)
CentOS Stream release 8
/etc/os-release doesn't seem to exist prior to version 7, and CentOs
Stream dropped the decimal-point - but VERSION_ID is the easiest to
parse.
Is /etc/redhat-release always just one line? (Similar files like /etc/lsb-release are several lines.)
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
Red Hat Enterprise Linux Server release 5.11 (Tikanga)
Red Hat Enterprise Linux Server release 6.4 (Santiago)
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Red Hat Enterprise Linux Server release 6.7 (Santiago)
Red Hat Enterprise Linux Server release 6.8 (Santiago)
Red Hat Enterprise Linux Server release 6.9 (Santiago)
Red Hat Enterprise Linux Server release 6.10 (Santiago)
Red Hat Enterprise Linux Server release 7.4 (Maipo)
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Red Hat Enterprise Linux Server release 7.7 (Maipo)
Red Hat Enterprise Linux Server release 7.9 (Maipo)
Red Hat Enterprise Linux release 8.1 (Ootpa)
Red Hat Enterprise Linux release 8.3 (Ootpa)
Red Hat Enterprise Linux release 8.4 (Ootpa)
Red Hat Enterprise Linux release 8.6 (Ootpa)
On Tue, 6 Jun 2023 11:50:53 +0100, Richard Harnden <[email protected]> wrote:
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
Red Hat Enterprise Linux Server release 5.11 (Tikanga)
Red Hat Enterprise Linux Server release 6.4 (Santiago)
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Red Hat Enterprise Linux Server release 6.7 (Santiago)
Red Hat Enterprise Linux Server release 6.8 (Santiago)
Red Hat Enterprise Linux Server release 6.9 (Santiago)
Red Hat Enterprise Linux Server release 6.10 (Santiago)
Red Hat Enterprise Linux Server release 7.4 (Maipo)
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Red Hat Enterprise Linux Server release 7.7 (Maipo)
Red Hat Enterprise Linux Server release 7.9 (Maipo)
Red Hat Enterprise Linux release 8.1 (Ootpa)
Red Hat Enterprise Linux release 8.3 (Ootpa)
Red Hat Enterprise Linux release 8.4 (Ootpa)
Red Hat Enterprise Linux release 8.6 (Ootpa)
If I parse this list through:
sed 's/.*release \([^(]*\)(.*/\1/'
I get:
5.6
5.8
5.11
6.4
6.6
6.7
6.8
6.9
6.10
7.4
7.6
7.7
7.9
8.1
8.3
8.4
8.6
I have two version; please help me to get the version in the form of 7 or 8
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 23:30:28 |
| Calls: | 12,105 |
| Calls today: | 5 |
| Files: | 15,006 |
| Messages: | 6,518,144 |