curl https://uk.images.linuxcontainers.org/ | awk -F "</*td>|</*tr>" '/<\/*t[rd]>.*/ {print $3, $5, $7, $9, $11}' > /tmp/updatetimestapmps 

#Debian 10 (Buster)
dbts=$(cat /tmp/updatetimestapmps | grep debian |grep buster |grep cloud| grep amd64 | awk '{ print $5 }') 
wget https://uk.images.linuxcontainers.org/images/debian/buster/amd64/cloud/"$dbts"/rootfs.tar.xz -O /var/lib/vz/template/cache/DailyDebianBuster.tar.xz 

#Ubuntu (Bionic Beaver)
ubts=$(cat /tmp/updatetimestapmps | grep ubuntu |grep bionic |grep cloud| grep amd64 | awk '{ print $5 }') 
wget https://uk.images.linuxcontainers.org/images/ubuntu/bionic/amd64/cloud/"$ubts"/rootfs.tar.xz -O /var/lib/vz/template/cache/DailyUbuntuBionicBeaver.tar.xz 

#Ubuntu 20.04 (FocalFossa)
ufts=$(cat /tmp/updatetimestapmps | grep ubuntu |grep focal |grep cloud| grep amd64 | awk '{ print $5 }') 
wget https://uk.images.linuxcontainers.org/images/ubuntu/focal/amd64/cloud/"$ufts"/rootfs.tar.xz -O /var/lib/vz/template/cache/DailyUbuntuFocalFossa.tar.xz

#Centos 8
c8ts=$(cat /tmp/updatetimestapmps | grep "centos 8" | grep -v '8-Stream' |grep cloud| grep amd64 | awk '{ print $5 }') 
wget https://uk.images.linuxcontainers.org/images/centos/8/amd64/cloud/"$c8ts"/rootfs.tar.xz -O /var/lib/vz/template/cache/DailyCentos8.tar.xz

#Alpine 3.12
alpine312=$(cat /tmp/updatetimestapmps | grep "alpine" | grep '3.12' |grep default| grep amd64 | awk '{ print $5 }') 
wget https://uk.images.linuxcontainers.org/images/alpine/3.12/amd64/default/"$alpine312"/rootfs.tar.xz -O /var/lib/vz/template/cache/DailyAlpine3.12.tar.xz

rm /tmp/updatetimestapmps