Re: find latest version of rpms from a mirror

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



From: john blair <mailtome200420032002@xxxxxxxxx>
> I want to write a script to find the latest version of rpm of a given package 
> available from a mirror for eg: 
> http://mirror.centos.org/centos/5/os/x86_64/CentOS/
> Is there any existing script that does this? Or can someone give me a general 
> idea on how to go about this?

Example:

  URL='http://mirror.centos.org/centos/5/os/x86_64/CentOS/'
  PKG=...
  links -dump $URL | grep "$URL$PKG-[0-9]" | cut -f2 -d' '

Replace with 'cut -d'/' -f9' if you don't want the full URL...

JD


      
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux