Sponsored Content
Full Discussion: While loop correction
Top Forums Shell Programming and Scripting While loop correction Post 302845773 by Kesavan on Thursday 22nd of August 2013 08:24:39 AM
Old 08-22-2013
The while loop you have written is infinite loop, you need to add conditions to validate whether the ssh check was successful or not and if successful, break from the loop and proceed otherwise continue the loop.
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

End of Error correction

I am being told by serveral different departmens that serveral of the products we use such as Oracle, IONA orbix 3.0, Veritas NetBackup and Tivoli Maestro are about to end support of Error Correction Support. Could some please help me understand what this actually means. Thanks Kristian (1 Reply)
Discussion started by: kristian
1 Replies

2. UNIX for Dummies Questions & Answers

Extract data correction???

Hi I have file "test.txt" i need to extract the data as below from this file. /home/cvs/gkc ->awk -v RS= '{print $(NF-2),$(NF-1),$NF}' test.txt Buildfile: build.xml Buildfile: build.xml Created dir: /dist/advance/2.0.4/20060926-0413 awk: The field -1 must be in the range 0 to 199. ... (6 Replies)
Discussion started by: gkrishnag
6 Replies

3. Shell Programming and Scripting

cron job - shell code correction

Hi I have a website that is having problem with cron jobs... I have a cron job set up to go to a page with this code... <? include('config.php'); if($_sys->bible_email_frequency == 'DAILY') { $u = new user(); $u->send_bible_email(); } ?> If i send my browser to this page... (2 Replies)
Discussion started by: whybelieve
2 Replies

4. Shell Programming and Scripting

small script correction

input cz1 87942437 87952030 M_001144992 0 + 87942537 87949664 0 3 710,114,2506, 0,2725,7087, script awk '{ n11 = split($11, t11, ",") n12 = split($12, t12, ",") for (i = 0; ++i < n11;) { s12 = $2 + t12 print $4"_xon"i, "\t",$4"_xon"i,"\t", $1,... (1 Reply)
Discussion started by: quincyjones
1 Replies

5. UNIX for Dummies Questions & Answers

Correction in Syllabus

Sir, I have the following modules to learn. The details of the modules in the syllabus published by the university are given below. There are some huge spelling mistakes in the syllabus. I have corrected few of them. Can u please quote the spelling mistakes in the syllabus if any and kindly... (1 Reply)
Discussion started by: achuthmama
1 Replies

6. Shell Programming and Scripting

Perl Script date correction

Need assistance for the below script. Little details: based on the hours specified it calculates future or past date,time. This script works absolutely great . But at one point when i wante specify future date with hours at 1682 hours ...1 hours skips .Dont know why the calculation misses 1... (2 Replies)
Discussion started by: ajayram_arya
2 Replies

7. Shell Programming and Scripting

awk correction

if awk 'BEGIN{if('$RSS'>='1000')exit 0;exit 1}' ; then dowhatever fi the above code works great when i'm comparing numerical figures. but when i try to do a string comparison, it does not work: if awk 'BEGIN{ /'$RSS'/ ~ /DB01/ exit 0;exit 1}' ; then dowhatever fi can this... (2 Replies)
Discussion started by: SkySmart
2 Replies
break(1)                                                           User Commands                                                          break(1)

NAME
break, continue - shell built-in functions to escape from or advance within a controlling while, for, foreach, or until loop SYNOPSIS
sh break [n] continue [n] csh break continue ksh *break [n] *continue [n] DESCRIPTION
sh The break utility exits from the enclosing for or while loop, if any. If n is specified, break n levels. The continue utility resumes the next iteration of the enclosing for or while loop. If n is specified, resume at the n-th enclosing loop. csh The break utility resumes execution after the end of the nearest enclosing foreach or while loop. The remaining commands on the current line are executed. This allows multilevel breaks to be written as a list of break commands, all on one line. The continue utility continues execution of the next iteration of the nearest enclosing while or foreach loop. ksh The break utility exits from the enclosed for, while, until, or select loop, if any. If n is specified, then break n levels. If n is greater than the number of enclosing loops, the outermost enclosing loop shall be exited. The continue utility resumes the next iteration of the enclosed for, while, until, or select loop. If n is specified then resume at the n- th enclosed loop. If n is greater than the number of enclosing loops, the outermost enclosing loop shall be used. On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways: 1. Variable assignment lists preceding the command remain in effect when the command completes. 2. I/O redirections are processed after variable assignments. 3. Errors cause a script that contains them to abort. 4. Words that follow a command preceded by ** that are in the format of a variable assignment are expanded with the same rules as a vari- able assignment. This means that tilde substitution is performed after the = sign, and also that word splitting and file name genera- tion are not performed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), exit(1), ksh(1), sh( 1), attributes(5) SunOS 5.10 17 Jul 2002 break(1)
All times are GMT -4. The time now is 04:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy