package="rpm -qva"
for names in `$package`
do
echo "upgrading $names "
mkdir /home/rh-upgrade/
cd /home/rh-upgrade/
wget ftp://ftp.mirror.ac.uk/sites/ftp.redhat.com/pub/redhat/linux/7.3/en/os/i386/RedHat/RPMS/$names*
new=`ls -l /home/rh-upgrade/$name* |awk '{print $9}'`
rpm -Fvh $new
done
# script is done save this file as something.sh and chmod to 755
-------------------------------------------------
Please also note it is probably best to run this at the initial
install of redhat since it may overwrite your config files since it
does a -Fvh in the last line before done which means force upgrade
there is also -ivh -Uvh which are safer then -Fvh which is a force
although sometimes -Uvh and ivh dont work
Thanks
Vahid