Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.


  Search this Thread
Old 03-17-2016, 11:21 PM   #1
LXer NewsBot
Registered: Dec 2005
Posts: 96,876

Rep: Reputation: 96
LXer: How to compare two version numbers in a shell script

Published at LXer:

When you are writing a shell script, there are cases where you need to compare two version numbers, and proceed differently depending on whether one version number is higher/lower than the other. For example, you want to check for the minimum version requirement (i.e., $version ? 1.3.0). Or you want to write a conditional statement where the condition is defined by a specific range of version numbers (e.g., 1.0.0 ? $version ? 2.3.1).



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need one shell script to compare two files. kathirvel Linux - Newbie 4 01-07-2014 10:19 AM
Bash script compare numbers in a file hayko Programming 11 09-18-2012 05:56 PM
Bash script to compare numbers in a txt file leopard86 Programming 6 09-11-2012 01:10 AM
LXer: Shell Script To Produce Prime Numbers On Linux And Unix LXer Syndicated Linux News 1 11-17-2009 03:54 PM
Script to compare numbers inside two text files bugg_deccan Programming 3 10-17-2007 10:53 PM > Forums > Linux Forums > Linux - News > Syndicated Linux News

All times are GMT -5. The time now is 04:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration