[gnu.bash.bug] break doesnt

wgb@tntdev.tnt.com (William G. Bunton) (06/15/89)

Given the following script:

--------------
while true
do
	break
	echo "Still in while"
shift
done
echo "Out of while"
-------------

When run by bash the following output is produced:

	Still in while
	Out of while

When run by bin/sh the following is produced:

	Out of while

It appears the break command just sets a flag, which is only checked
each time the while condition is checked. Then every command in the
do--done part is executed.

Bill
--
William G. Bunton            wgb@tntdev.tnt.com     {uunet,natinst}!tntdev!wgb
Tools & Techniques, Inc. Austin, TX