#!/bin/bash
##########################################################
# Receive and Install updates for SuSE workstastions
##########################################################

ans=y
ws="HOST1 HOST2 HoST3"    #<---replace HOST1, HOST2... with your workstations names or ip numbers

for i in $ws 
do
    echo $i 
    ssh $i 'online_update -s -k'
    read -p "Do you want to continue with the installaion (Y/N)?" ans
    if [ $ans = "Y" ] || [ $ans = "y" ] ; then
        ssh $i 'online_update -g -V && online_update -i -V' 
    else
        echo "aborting..."
    fi
done

