Andrew Gaffney wrote:
Amit Dor-Shifer wrote:
Given the following:
# qlist -Iv sys-apps/portage
sys-apps/portage-2.1.4.5
How do I safely extract the "2.1.4.5"?
That's probably offtopic for this list, since it really has nothing to
do with portage itself. However, you probably want something like:
qlist -Iv sys-apps/portage | sed -e 's:^.*-\([0-9][^-_]*\).*$:\1:'
And if you want the full version (with RC position and revision):
qlist -Iv sys-apps/portage | sed -e 's:^.*-\([0-9].*\)$:\1:'
--
Andrew Gaffney http://dev.gentoo.org/~agaffney/
Gentoo Linux Developer Catalyst/Genkernel + Release Engineering Lead