shift command?

Eric Rossiter rossiter at discoverynet.com
Tue Jun 19 20:54:29 CDT 2001


Ok, with Hal's help, got the mail thang working well enough.

Psuedo code for the script is as follows.
while :
do
put machine name in variable
ping variable
check exit status of command
echo all is good to term
else
echo all is not good to term
mail all is not good

...

done

I was planning on repeating this loop about 15 times for the machines on the
LAN, as well as about 10 more for routers out on the frame.  I had a thought
(dangerous as it may be,) and was wondering if could specify multiple
machine names to the variable the first time through as follows:

BOX=box1 box2 box3 box4 ...

and then use the shift command at the bottom of the code block somewhere,
which would then start the loop using the next machine name?  Is this even
possible or am I way out there?

TIA,
Eric




More information about the Kclug mailing list