![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how can i put the condition in for loop for the below. | mail2sant | Shell Programming and Scripting | 1 | 04-28-2008 04:49 AM |
| What condition to be put in the while loop? | nehaquick | UNIX for Dummies Questions & Answers | 1 | 02-15-2008 04:06 PM |
| Command used for checking space occupied by files & sub-direc's inside a mount in %? | weblogicsupport | SUN Solaris | 2 | 02-01-2008 07:00 AM |
| script to check for a condition inside a file | kiran1112 | Shell Programming and Scripting | 11 | 03-21-2007 09:38 AM |
| Condition checking | trynew | Shell Programming and Scripting | 14 | 06-21-2002 11:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Checking condition inside the loop
Hi all,
I have one clarification i am using the loop which will process for each record .suppose there is f ailure in the first record it need to send mail and process the next .my code: defcount=`cat <filename>|wc -l` while [[$cnt -le $defcount ]] do if <some condiotion> then echo "mail" fi done so if the condition is failed i need to exit the if loop not the entire loop.it should againn go to the starting of loop and process for next record. Kindly help me out in the issue. Thanks in advance. |
|
||||
|
while read line ; do
if condition fi done < read_from_file |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|