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