[NBLUG/talk] shell scripting help

Sean seanvanco at gmail.com
Tue Jun 10 16:30:03 PDT 2008


As you suggested I put in this line both before and after the sleep 30 command:

echo "."

After the program initiates, it waits about 7 seconds, give the ping
failed output, give the first . immediately after, waits 30 seconds,
gives the second ., and then waits 7 seconds before the next ping.
Repeat.

It seems that the problem is occurring after the sleep command or at
the beginning of the script. I'd be very surprised if it's caused by
this line:

time=`expr $time + 1`

line, so it must then be the

if [ -z "$1" ]; then

line. But again, I'm too rusty to know for sure, and I have no idea
what that "-z" on the "if" line does. I pulled it from a sample
script.

Thank you for helping me flounder through this. I need to get back
into this as it'll be far more useful now that I manage some Linix
servers.



More information about the talk mailing list