![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" | iBot | UNIX and Linux RSS News | 0 | 01-04-2008 12:00 PM |
| Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" | Lokesha | UNIX for Dummies Questions & Answers | 4 | 12-19-2007 10:52 PM |
| Avoid "++ requires lvalue" Error in Loop Calculation | sandeepb | Shell Programming and Scripting | 3 | 09-24-2007 04:02 AM |
| How to combine "find" command in for each loop (tcsh) | umen | Shell Programming and Scripting | 3 | 08-22-2005 01:07 AM |
| preventing "break" in a script | MizzGail | Shell Programming and Scripting | 6 | 04-08-2004 10:48 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
"Break" from a Loop
I created a script-
PHP Code:
Here we have "while" loop then a "for" loop and finally an "if" conditional. Now when the "if" condition fails then I use "break". My qusn is will this BREAK , break it out of "For" Loop or totally out of "While" loop i.e. exit it out of script. Expert opinion needed. Dont have enough time to test the it myself. Thanks Sumeet |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
This break is going to take you out from for loop |
|
#3
|
|||
|
|||
|
kool ...thats what I want ..
Thanks Sumeet |
|||
| Google The UNIX and Linux Forums |