163 reputation
6
bio website sosiouxme.wordpress.com
location
age
visits member for 1 year, 3 months
seen Jun 18 at 12:31

I'm just one of those geek guys who knows a few things about programming and web servers.


Jun
18
awarded  Teacher
Jun
18
answered Difference between ls -l and ll?
Apr
27
awarded  Scholar
Apr
27
accepted How to programmatically determine the highest version kernel RPM installed?
Apr
18
awarded  Popular Question
May
25
comment How to programmatically determine the highest version kernel RPM installed?
That will work; as it turns out, so does "sort -V" which I'd never heard of. At least, for most uses. These tools are still pretty handy to know about though :)
May
25
comment How to programmatically determine the highest version kernel RPM installed?
Dingdingding! It may be possible to confuse sort -V with a complicated scheme that requires the rpmdevtools to sort it out, but for the kernel and most versioning schemes I think it does the job! Thanks @Sukminder, I did not know that existed.
May
21
awarded  Supporter
May
21
comment How to programmatically determine the highest version kernel RPM installed?
-n only helps you with the first number. Try sorting this: 2.6.18 238.12.1.el5 2.6.18 238.19.1.el5 2.6.18 274.12.1.el5 2.6.18 274.8.2.el5 sort is absolutely the wrong tool here, as well as anything else that doesn't know anything about version-release schemes.
May
21
comment How to programmatically determine the highest version kernel RPM installed?
Maybe I'm overthinking it. rpm -q kernel always seems to list kernels in version order. Is that reliable?
May
21
awarded  Editor
May
21
comment How to programmatically determine the highest version kernel RPM installed?
Those are not reliable methods for determining which is a higher version. Checking /boot might include kernels that are for entirely different multiboot partitions.
May
21
revised How to programmatically determine the highest version kernel RPM installed?
improved the example to highlight the problem
May
21
comment How to programmatically determine the highest version kernel RPM installed?
Sorry, I don't think so. A simple string sort would put kernel-2.6.10 before kernel-2.6.9. This has to work generically, not just for the example.
May
21
awarded  Student
May
21
asked How to programmatically determine the highest version kernel RPM installed?