Sponsored Content
Top Forums Shell Programming and Scripting Linux kernel version comparision method Post 302909167 by veeresh_15 on Tuesday 15th of July 2014 04:39:07 AM
Old 07-15-2014
Thanks for your reply Chubler, I have couple of questions related to your code.

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

I was not aware of cutting out the string this way, i used to use awk or sed, but this looks more simpler,can you please explain me the syntax?

Code:
if [ ${#re_ver} -lt ${#received} -a "$re_ver" '>' "$ex_ver" ]

In this if statement, you are using '>' symbol for comaparision, why is the comparasion operator in quotes?

Regards,
Veer
 

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
Locale::Codes::LangExt(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangExt(3pm)

NAME
Locale::Codes::LangExt - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangExt; $lext = code2langext('acm'); # $lext gets 'Mesopotamian Arabic' $code = langext2code('Mesopotamian Arabic'); # $code gets 'acm' @codes = all_langext_codes(); @names = all_langext_names(); DESCRIPTION
The "Locale::Codes::LangExt" module provides access to standard codes used for identifying language extensions, such as those as defined in the IANA language registry. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default IANA language registry codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language extensions. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langext('acm','alpha'); $lext = code2langext('acm',LOCALE_LANGEXT_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from the IANA language registry, such as 'acm' for Mesopotamian Arabic. This is the default code set. ROUTINES
code2langext ( CODE [,CODESET] ) langext2code ( NAME [,CODESET] ) langext_code2code ( CODE ,CODESET ,CODESET2 ) all_langext_codes ( [CODESET] ) all_langext_names ( [CODESET] ) Locale::Codes::LangExt::rename_langext ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangExt::add_langext ( CODE ,NAME [,CODESET] ) Locale::Codes::LangExt::delete_langext ( CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_alias ( NAME ,NEW_NAME ) Locale::Codes::LangExt::delete_langext_alias ( NAME ) Locale::Codes::LangExt::rename_langext_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::delete_langext_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Locale::Codes::LangExt(3pm)
All times are GMT -4. The time now is 10:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy