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
how to execute script from my desktop windows xp to my HPUX server? kenshinhimura HP-UX 2 03-05-2008 05:47 PM
Script runs fine on UNIX Server...Not through MSK Tool kit on Windows Server madhunk UNIX for Dummies Questions & Answers 5 01-31-2008 01:30 PM
how to move a file from one server to another server using FTP in shell script? forevercalz Shell Programming and Scripting 4 10-27-2005 02:53 AM
how to test sun server waterbear SUN Solaris 2 08-05-2005 12:24 AM
Script to Test Application Server is running duglover UNIX for Dummies Questions & Answers 0 04-28-2004 10:47 AM

Closed Thread
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
  #1 (permalink)  
Old 08-18-2008
ukatru ukatru is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 38
execute a script on test server from dev server

I need to execute a script from dev server which is located on Test server.I can use ftp to connect to dev server and from there how can i execute a command on test server.

Thanks
  #2 (permalink)  
Old 08-18-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
You can't execute commands over ftp unless you hack the ftp server to support this. Perhaps you could use ssh instead. Or if the command is well-defined, you could drop a particular file over ftp to signal to a process on the server to execute some predefined command; it would then clean out the signal file when the command has completed, and resume monitoring the directory where you drop the file.

All of these themes are well explored on this site; try the search facility.
  #3 (permalink)  
Old 08-18-2008
ukatru ukatru is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 38
I am able to execute a command with ssh option.But i am facing one problem.before executing a script i need to execute my .profile also.because i have some env varaibles which comes from .profile and the sript will use them.
Can any one of you please help me how can i do that.
  #4 (permalink)  
Old 08-18-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652

Code:
ssh remote '. .profile; othercommands'

I'm a bit puzzled about the .profile comment, though. If ssh is correctly configured, it should run your .profile already.
  #5 (permalink)  
Old 08-18-2008
ukatru ukatru is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 38
I am getting the following error when i tried to exucte .profile in ssh command

stty: tcgetattr: Not a typewriter
  #6 (permalink)  
Old 08-18-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
You should not have stty in your .profile. Maybe ssh -t could help, though. Nevertheless, the warning just means stty didn't run, not that the whole command line failed.
Closed Thread

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 02:46 PM.


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