E sobre isso?
#! /bin/bash
re='^[0-9.]+$' #regex to match digits and dots
VERSION_1=$( # variable for the CentOS version
lynx --dump http://centos.bio.lmu.de/ |grep "/$" | \
while read i
do
TMP_VERSION='echo $i |awk -F "/" '{print $(NF-1)}''
if [[ $TMP_VERSION =~ $re ]] ; then
echo $TMP_VERSION
fi
done | sort -t . |tail -1)
VERSION_2=$( #Variable for the ISO name
lynx --dump http://centos.bio.lmu.de/$VERSION_1/isos/x86_64/ |grep DVD| grep "\.iso$" |awk -F "/" '{print $NF}'| \
while read i
do
echo $i
done |tail -1
)
wget http://centos.bio.lmu.de/$VERSION_1/isos/x86_64/$VERSION_2