This is the mail archive of the
mailing list for the Cygwin project.
Re: variable after break
- From: Dave <kilroyd at googlemail dot com>
- To: prz <Guy dot Przytula at riziv dot fgov dot be>
- Cc: cygwin at cygwin dot com
- Date: Wed, 12 Jul 2006 09:48:10 +0100
- Subject: Re: variable after break
- References: <firstname.lastname@example.org>
I am using a simple program with a loop
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 ?
I don't believe this is cygwin specific. Have a read of the bash man page.
Hint: Not only are you reading the variable outside the loop in which
you first declare it, you're also reading it outside the group command.
From my reading of your command you shouldn't need to call grep, gawk,
and use a while loop to match another string. gawk should be able to do
everything for you. info gawk.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html