This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: variable after break


prz wrote:
I am using a simple program with a loop
<snip>
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.

Dave.

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]