1 |
On Monday 26 June 2006 08:44, Bo Ørsted Andresen wrote: |
2 |
> I was of course considering something like this: |
3 |
> |
4 |
> # cd /var/db/pkg && ls * | |
5 |
> ${some_magic_regular_expression_to_remove_version} |
6 |
> |
7 |
> But I have found it impossible to make a regular expression that does break |
8 |
> for at least one of those: |
9 |
|
10 |
sed -r 's/-[^-]+(-r[0-9]+)*$//' |
11 |
It works on the examples you provided. I don't think anything in the tree |
12 |
uses '-' in the version number, unless it's a case of '-rN'. But you never |
13 |
know, of course, so I always double check all package names I ever filter |
14 |
through anything. |
15 |
|
16 |
Regards |
17 |
Jure |