![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | 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 |
| "Break" from a Loop | sumeet | Shell Programming and Scripting | 2 | 05-18-2008 10:36 PM |
| Urgent:Comparing two Strings using If Loop | Anji | Shell Programming and Scripting | 2 | 01-09-2008 04:54 AM |
| ssh break the while loop? | fedora | Shell Programming and Scripting | 5 | 05-23-2007 07:54 AM |
| URGENT,URGENT- Need help tape drive installation | sriny | UNIX for Advanced & Expert Users | 3 | 11-16-2006 11:43 AM |
| ksh how user can break out of loop | beckett | Shell Programming and Scripting | 4 | 04-07-2004 03:55 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
How to break the while loop???(Very Urgent)
H,
I am running the following log.sh shell script. $no_of_ps=7 while [ $no_of_ps -gt 0 ] do echo "hello $no_of_ps" ps_file=`tail -$no_of_ps /tmp/A380_RFS24/test.ls | head -1` no_of_ps=`expr $no_of_ps - 1` echo "package is: $ps_file" >> /tmp/A380_RFS24/log/A380_RFS24.log ps_file1=`echo $ps_file| sed "s/.ps//g"` echo "after deleting .ps extension package is: $ps_file1" >> /tmp/A380_RFS24/log/A380_RFS24.log ps2pdf -dSAFER -sPAPERSIZE=a4 /tmp/A380_RFS24/amm_r0_ps/$ps_file1.ps /tmp/A380_RFS24/amm_r0_pdf/$ps_file1.pdf >> /tmp/A380_RFS24/log/A380_RFS24.log staus_gscript=$? echo "status after converting .ps to .pdf is: $staus_gscript" >> /tmp/A380_RFS24/log/A380_RFS24.log if [ $staus_gscript -eq 1 ] then break fi done When i am running the above script i am getting the output. But how shell i break my While loop when i didnot get any input in 2nd line of test.ls file?? |
| Forum Sponsor | ||
|
|