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
CHECKBASHISMS(1)					      General Commands Manual						  CHECKBASHISMS(1)

NAME
checkbashisms - check for bashisms in /bin/sh scripts SYNOPSIS
checkbashisms script ... checkbashisms --help|--version DESCRIPTION
checkbashisms, based on one of the checks from the lintian system, performs basic checks on /bin/sh shell scripts for the possible presence of bashisms. It takes the names of the shell scripts on the command line, and outputs warnings if possible bashisms are detected. Note that the definition of a bashism in this context roughly equates to "a shell feature that is not required to be supported by POSIX"; this means that some issues flagged may be permitted under optional sections of POSIX, such as XSI or User Portability. In cases where POSIX and Debian Policy disagree, checkbashisms by default allows extensions permitted by Policy but may also provide options for stricter checking. OPTIONS
--help, -h Show a summary of options. --newline, -n Check for "echo -n" usage (non POSIX but required by Debian Policy 10.4.) --posix, -p Check for issues which are non POSIX but required to be supported by Debian Policy 10.4 (implies -n). --force, -f Force each script to be checked, even if it would normally not be (for instance, it has a bash or non POSIX shell shebang or appears to be a shell wrapper). --extra, -x Highlight lines which, whilst they do not contain bashisms, may be useful in determining whether a particular issue is a false posi- tive which may be ignored. For example, the use of "$BASH_ENV" may be preceded by checking whether "$BASH" is set. --version, -v Show version and copyright information. EXIT VALUES
The exit value will be 0 if no possible bashisms or other problems were detected. Otherwise it will be the sum of the following error val- ues: 1 A possible bashism was detected. 2 A file was skipped for some reason, for example, because it was unreadable or not found. The warning message will give details. SEE ALSO
lintian(1). AUTHOR
checkbashisms was originally written as a shell script by Yann Dirson <dirson@debian.org> and rewritten in Perl with many more features by Julian Gilbey <jdg@debian.org>. DEBIAN
Debian Utilities CHECKBASHISMS(1)
All times are GMT -4. The time now is 01:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy