What's the best way to compare dotted version strings from a script?

Richard W.M. Jones rjones at redhat.com
Wed Aug 31 17:58:21 UTC 2011


On Wed, Aug 31, 2011 at 06:20:35PM +0100, David Howells wrote:
> Is there a program or script installed/installable by Fedora that can be used
> to compare dotted version strings (eg. "1.5.2") from a shell script?

For non-RPM version strings, try 'sort -V'.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v


More information about the devel mailing list