Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

commands sometimes don't execute



Did this get through?  Anyone know what's wrong?
Please reply to me directly, as I don't read the list.
I tried b10, and the problem is still there.

Thanks.

Long live zsh!

Dave

Received: by Yost.com via SMTP (931110.SGI/931108.SGI.AUTO.ANONFTP)
	for yost id AA00863; Thu, 6 Jul 95 11:28:13 -0700
Message-Id: <9507061828.AA00863@xxxxxxxx>
From: Dave@xxxxxxxx
To: zsh-list@xxxxxxxxxxxx
Subject: commands sometimes don't execute
Cc: Dave@xxxxxxxx
Reply-To: Dave@xxxxxxxx
Date: Thu, 06 Jul 1995 11:28:05 -0700
Sender: yost@xxxxxxxx

To see where the zsh bug is, search below for the string "never execute"

The script that exhibits the alleged zsh bug is
a handy little script you might find useful if
you are connected to the internet only on demand.
You run this command when you want to force a connection.

VERSION=zsh 2.5.03

Thanks.

Dave

 = = = = = = = = =
#!/bin/zsh
# or maybe late model ksh

# Force a connection to the Internet
# Dave@xxxxxxxx 95-1-28 Works on SGI
# Dave@xxxxxxxx 95-6-25 when this initiates a connection, print date (doesn't work)

provider=Internex
ppphost=internexppp
# InterNex trouble phone number 800 291 5178
# PacBell priority repair number 811 8081
# ISDN Hotline 800 472 4736

verbose=yes
repeating=
already_connected=yes

case "$1" in
 -q) verbose= ;;
 -r) repeating=yes ;;
 "") ;;
 *) echo 1>&2 "
Usage: internet [ -q ]

The -q option suppresses the usual verbose output.
" ;;
esac

jab () {
    ping -qc 1 $ppphost | grep '1 packets received' > /dev/null
    echo $?
}

case "$verbose" in
yes) (sleep  2 ;
      echo 1>&2 "Trying to call ${provider}...\c" ;
      sleep 30 ;
      echo 1>&2 ;
      echo 1>&2 "Trouble number is 800 291 5178" ;
      )&
esac

if [[`jab` != 0]] ; then
    until [[`jab` = 0]] ; do
	case "$verbose" in
	yes)
	    echo 1>&2 ".\c"
	esac
    done

    # The commands from here to fi almost never execute
    # even when execution has clearly traversed the until loop.
    case "$verbose" in
	yes) echo 1>&2 ""
	esac

    echo "If you can see this, it works (but you can't)."
    already_connected=no
fi

case "$verbose" in
yes) kill %%
     case $already_connected in
     yes) when=       ;;
     *)   when=`date` ;;
     esac
     echo 1>&2 Connected $when
esac



Messages sorted by: Reverse Date, Date, Thread, Author