Sponsored Content
Top Forums Shell Programming and Scripting Linux kernel version comparision method Post 302909133 by Chubler_XL on Monday 14th of July 2014 07:10:27 PM
Old 07-14-2014
Can't help with the Red Hat Kernel version naming standard but this might help with this particular issue:

Code:
expected=2.6.32-279.el6.x86_64
received=$(uname -r)

exp_ver=${expected//\.el6.*/}
re_ver=${received//\.el6.*/}

if [ ${#re_ver} -lt ${#received} -a "$re_ver" '>' "$ex_ver" ]
then
    echo "Installed Version is higher than Expected."
    echo "Passed."
else
    echo "== FAILED == Received output is not as expected."
fi

This User Gave Thanks to Chubler_XL For This Post:
 

10 More Discussions You Might Find Interesting

1. Linux Benchmarks

Dual Xeon 2.6, RedHat EL 4 ES, up to latest release version. 2.6.9 kernel

============================================================== BYTE UNIX Benchmarks (Version 3.11) System -- Linux linux.hhc.ac.uk 2.6.9-11.ELsmp #1 SMP Fri May 20 18:26:27 EDT 2005 i686 i686 i386 GNU/Linux Start Benchmark Run: Wed Jul 6 15:06:07 BST 2005 1 interactive users.... (2 Replies)
Discussion started by: Garp
2 Replies

2. Linux

kernel version

Hi all, anyone know what should be the kernel version for red hat linux enterprise 3 update 3 . I have installed kernel version is 2.4.21-4 and some says that it may not be the red hat linux enterprise 3 update 3 . :o thanks Bert (4 Replies)
Discussion started by: bert.n
4 Replies

3. Solaris

How can i see kernel patch version?

Hello experts. How can i see kernel patch version? what are advantages applying that patch? Thanx in advance (5 Replies)
Discussion started by: younus_syed
5 Replies

4. Debian

how to find out the kernel version of a particular debian release ?

Is there any metrics table available somewhere listing out, which kernel version is there in particular debian release ? Also, can somebody tell which debian release is having the kernel version 2.6.26 ? (1 Reply)
Discussion started by: thegeek
1 Replies

5. Shell Programming and Scripting

Incorrect kernel version (why).

ps -A | grep firefox | kill `awk '{print $1}'` Warning: /boot/System.map-2.6.35.11-83.fc14.x86_64 has an incorrect kernel version. The command have succeeded but with the warning. The command before the previous one had not been successful. But there was also this warning. (1 Reply)
Discussion started by: Xcislav
1 Replies

6. Red Hat

Downgrade kernel version with yum

Dear all, Now I need to downgrade my current kernel to 2.6.12 I found some pages with Google, and they said that I can do it with yum, but there is not details information. How can I use yum to downgrade kernel version :wall: Please help me Thank you very much (4 Replies)
Discussion started by: Hannibal2010
4 Replies

7. Solaris

about the Kernel version ?!!

Hi All I have the below information ... and I want to know how to get the lats Kernel version ? and is this Kernel version SunOS 5.10 Generic_147440-13 last version or what ? - Hostname: server1 Release: 5.10 Kernel architecture: sun4u Application architecture: sparc Hardware... (1 Reply)
Discussion started by: roooooot
1 Replies

8. Shell Programming and Scripting

get the perl version (decimal value comparision)

Hi All, can you pls throw some light for below logic -> Check the perl version -> if the version is greater than or equal to 5.8 -> proceed to next step -> else fail Regards Kamal (2 Replies)
Discussion started by: kamauv234
2 Replies

9. Red Hat

Kernel version required for installing KVM

Hi friends, I have a created a RHEL 6.4 for installing KVM in Virtual box. My machine is a 64 bit, but virtual box was not allowing to install x86_64 version RHEL. So I had to install 32 bit i686 version of RHEL. The kernel came with the CD was 2.6.32-358.el6.i686. But KVM doesnt support... (2 Replies)
Discussion started by: shyam2j
2 Replies

10. HP-UX

Regarding firmware and kernel version of HP-UX systems.

Dear All, Please help to find out the patch and firmware versions in HP-UX systems. as uname -r is showing os version and uname -a HP-UX xxxxxx B.11.23 U 9000/800 2781427196 unlimited-user license. Kindly help to find out the existing Kernel and firmware versions. Also I need to... (3 Replies)
Discussion started by: anuragr
3 Replies
echo(1B)					     SunOS/BSD Compatibility Package Commands						  echo(1B)

NAME
echo - echo arguments to standard output SYNOPSIS
/usr/ucb/echo [-n] [argument] DESCRIPTION
echo writes its arguments, separated by BLANKs and terminated by a NEWLINE, to the standard output. echo is useful for producing diagnostics in command files and for sending known data into a pipe, and for displaying the contents of envi- ronment variables. For example, you can use echo to determine how many subdirectories below the root directory (/) is your current directory, as follows: o echo your current-working-directory's full pathname o pipe the output through tr to translate the path's embedded slash-characters into space-characters o pipe that output through wc -w for a count of the names in your path. example% /usr/bin/echo "echo $PWD | tr '/' ' ' | wc -w" See tr(1) and wc(1) for their functionality. The shells csh(1), ksh(1), and sh(1), each have an echo built-in command, which, by default, will have precedence, and will be invoked if the user calls echo without a full pathname. /usr/ucb/echo and csh's echo() have an -n option, but do not understand back-slashed escape characters. sh's echo(), ksh's echo(), and /usr/bin/echo, on the other hand, understand the black-slashed escape characters, and ksh's echo() also understands a as the audible bell character; however, these commands do not have an -n option. OPTIONS
-n Do not add the NEWLINE to the output. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), echo(1), ksh(1), sh(1), tr(1), wc(1), attributes(5) NOTES
The -n option is a transition aid for BSD applications, and may not be supported in future releases. SunOS 5.11 3 Aug 1994 echo(1B)
All times are GMT -4. The time now is 10:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy