[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Parsing package filenames (was: Re: New ftp method for dselect)



> ...
> >     filenames have the form <PKG>-<VER>-<REV>.<EXT>
> >     e.g.:                   ab-cd-1.23a-45678.tar.gz
> >     Field Separators:            -     -     .
> >     Field Contents:         ab-cd 1.23a 45678 tar.gz
> ...
> >  -  Counting to the right from that point, the first '.' encountered
> >     separates REV from EXT.  Whitespace to the right of EXT delimits it.
> >  -  Counting to the left from that point, the first '-' encountered
> >     separates PKG from VER  Whitespace to the left of PKG delimits it.
> 
> FWIW, _all_ RedHat (i386) packages conform to the regular expression
> 
> 	sed "/^${PKG}-[^-]*-[^-]*\.i386\.rpm$/p"`
> 	         PKG - VER - REV . EXT

Since I don't really have anything invested in this debate, I'll throw
in my last two cents and shut up.  It seems to me that changing the
very few packages which don't already conform to such a naming scheme
would be much less disruptive than renaming every package.

David
-- 
David Engel                        Optical Data Systems, Inc.
david@ods.com                      1101 E. Arapaho Road
(214) 234-6400                     Richardson, TX  75081


Reply to: