X-Spam-Check-By: sourceware.org Message-ID: <5283821.post@talk.nabble.com> Date: Tue, 11 Jul 2006 23:55:20 -0700 (PDT) From: prz To: cygwin AT cygwin DOT com Subject: variable after break MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-Sender: Guy DOT Przytula AT riziv DOT fgov DOT be X-Nabble-From: prz X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I am using a simple program with a loop #!/cygdrive/c/Cygwin/bin/bash db2pd -d ddba -transaction | grep " $lw " | gawk '{ print $2" "$4}' | { while read TREC do set - $TREC tid=$2 aid=$1 echo "tid : $tid aid : $aid" if [[ "${tid}" -eq ${lw} ]] then echo "break : aid : $aid " break fi done } echo "aid : $aid " && [[ ! -z $DEBUG ]] ... and the console print : tid : 3 aid : 86 break : aid : 86 aid : when getting out of the loop with break the variable $aid gets cleared it was printed before the break and getting out of the loop Any idea / hint ? Thanks for all info Best Regards, Guy Przytula -- View this message in context: http://www.nabble.com/variable-after-break-tf1929303.html#a5283821 Sent from the Cygwin Users forum at Nabble.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/