update software

Matthew Miller mattdm at mattdm.org
Mon Jul 31 19:35:52 UTC 2006


On Tue, Aug 01, 2006 at 12:26:34AM +0500, Waqas Toor wrote:
> to be honest i use fedora but the script to write is purely distro 
> independent..
> so
> if
> wget abc.2.3.tar.gz .... how to check 2.3. part in this string in
> bash.. as its the requirement

You'll need to have a set of rules for how each package puts its version
number in the filename. Generally this is of the form
"package-x.y.z.tar.gz", but you'll have to deal with issues like
"package2-x.y.z.tar.gz" and "pack-age-x.y.z.tar.gz" and
"package-beta.n-x.y.z.tar.gz", etc. -- there's no standard way of doing
this.

Then, use one of the many available text parsers (given the complication,
this is probably a job for perl) to extract the number you want.

-- 
Matthew Miller           mattdm at mattdm.org          <http://mattdm.org/>
Boston University Linux      ------>              <http://linux.bu.edu/>




More information about the fedora-list mailing list