vi scripts on UNIX

Hi there
I'm hoping one of the expert unix guys or gals can assist me in understanding the language within scripts

e.g

clear
while true
do
tput cup 0 0
        LIST=`grep cisco  /etc/hosts|grep -v _int | awk '{print $2}'`
        for SITE in $LIST
        do
        IP=`grep "$SITE" /etc/hosts | grep -v _int| cut -d" " -f1`
        CN=`grep "$SITE" /etc/hosts | grep -v _int| cut -d" " -f2`
        #echo "$SITE\t loss at  __                              "
        MESS=`ping $SITE -n $1 |grep transmit|cut -d"," -f3|cut -d"%" -f1`
        #echo "^[[A$SITE\t Up at $MESS% "
        if [ $MESS -gt 99 ]
        then
        echo "$SITE\t*is DOWN$MESS% Loss*       $CN              "
        else
        echo "$SITE\t is UP at $MESS% Loss      $CN              "
        fi
        done
sleep 3
clear
done

~

What does this do from the first sting to the last.

Thanks in advance
Marcus

added code tags for readability --oombera

the script reads all hostnames that have 'cisco' in it from the /etc/hosts (so we are probably talking routers here) and then performs a 'ping' to see if they are 'alive' or not. This is done every 3 seconds.

Thanks for that.

But i need to know the meaning to the commands within this script.

while true =
tput =
CN =
MESS =
cut =
-v =

etc...

is there some place ( links when i can go through all these things )
and start to understand them myself instead of always asking someone

Thanks in advance
Marcus.

But i need to know the meaning to the commands within this script.

while true = man true for more info "true, false - provide truth values"
tput = man tput for more info "tput - initialize a terminal or query terminfo database"
CN = just a variable
MESS = just a variable
cut = man cut
grep -v = is a switch for grep. man grep for more info

and so on down the road. look at it this was IF you have

var1=something else. most likely var1 is a variable.
if you have a string of commands IE true, grep, tput, cut, grep......

you can type at a shell prompt: man <i>command-name</i> and it will give you the manual page for said command.

Much appreciated.

Have Fun.