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