Bash traps - while emitting ERR trap
Christopher Faylor
cgf-idd@cygwin.com
Wed Jul 30 21:57:00 GMT 2003
On Wed, Jul 30, 2003 at 12:15:07PM -0700, Andrew DeFaria wrote:
>Given the following script:
>
>#!/bin/bash
>function cleanup { echo "ENTER cleanup"
>} # cleanup
> trap cleanup EXIT ERR
> declare -i i=4 echo "Entering while loop"
>while [ $i -gt 0 ]; do
>echo "In while loop"
>let i=i-1
>done echo "After trap is set"
>Why is "ENTER cleanup" echoed twice when run?
This is really not a cygwin question.
If you think this is a bug then you can send email to
bug-bash-AT-gnu-PERIOD-org .
Otherwise, the usenet newsgroup comp.unix.shell may be able to help.
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to aaaspam@sourceware.org
and be permanently blocked from mailing lists at sources.redhat.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list