The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
ls command in Remote Server vasuarjula Shell Programming and Scripting 6 06-08-2008 12:11 PM
ls -ltr command On Remote server vasuarjula Shell Programming and Scripting 2 06-01-2008 10:55 AM
ls command in Remote Server vasuarjula AIX 0 05-30-2008 10:22 PM
script working periodically lf398 Shell Programming and Scripting 1 06-10-2006 10:57 PM
remote server command in a job Jimbo Shell Programming and Scripting 2 01-30-2002 03:18 PM

 
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 03-17-2008
sayeo sayeo is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 18
script to send command periodically to remote server

Hi, I'm wondering if there's a way to send a command periodically to remote server through a script.

Right now I have this:
Code:
keepLooping=1
ssh user@domain
while (( keepLooping == 1 ))
do
  echo a
  sleep 3
done
but what this does is ssh to the server, and only when the connection is closed do the following commands run. What I'm trying to achieve is to automate me SSHing to the server and entering a command every xx seconds.

Any suggestions? Thanks!
 

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 07:38 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