The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
rsh script with inside a for loop trekianov Shell Programming and Scripting 5 12-06-2008 12:39 PM
Checking condition inside the loop ithirak17 Shell Programming and Scripting 1 03-13-2008 08:37 AM
Repetitive Tasks: using if..then inside a loop garak Shell Programming and Scripting 2 03-13-2006 07:36 AM
input inside while read loop jhansrod Shell Programming and Scripting 3 08-13-2005 11:46 AM
read inside a while loop dta4316 UNIX for Dummies Questions & Answers 3 05-21-2005 11:53 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 12-07-2007
joettacm joettacm is offline
Registered User
  
 

Join Date: Dec 2007
Location: Missouri
Posts: 5
Question remsh inside of while loop

I have a space delimited file containing: hostname OracleSID connectstring
I want to loop through the file and execute remsh to check the database processes.

cat $filename | while read HOST SID CONNECT
do
{
result=`remsh $HOST "ps -ef | grep pmon_${SID}$| grep -v grep"`
if ..... then.... fi
}
done
I can execute a variety of commands within the loop, but the second I add the "result=`remsh...`... the loop will only execute 1 time for the first entry in the file. Then it stops. no error, but the loop is done. Please help.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:27 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0