Re: update software

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

 



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@xxxxxxxxxx          <http://mattdm.org/>
Boston University Linux      ------>              <http://linux.bu.edu/>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux