On Saturday 23 August 2008 08:07:15 David C. Rankin wrote:
There has to be a better way to do this. How can I pull the version information from the filename itself and take the highest version regardless of the file time information? I can't figure out how to parse the version fields in the filename after I have the directory list of fglrx files without adding more sed calls and more loop. I'd pull the version info like this:
fglrx64_7_1_0_SUSE110-8.522-1.x86_64.rpm ^^^^^ out of what is returned by $(ls -t fglrx*.rpm) and use that to select the file? Is it a reasonable approach or will it be more inefficient? What says the brain trust?
Do answer your question, how about ls fglrx*|tail -1 since ls does its own sorting. However, we have zypper, and then you could do something like zypper sa -t plaindir /path/to/rpms repoalias and then zypper would always keep track of what the latest available version is, so when you do zypper in fglrx64_7_1_0 it would get the correct version Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org