Box A's perl script calling box B's shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Box A's perl script calling box B's shell script
# 1  
Old 09-13-2006
Box A's perl script calling box B's shell script

Hi all,

i have a perl script one server. I am running a cronjob to execute my perl script.
Code:
#! /usr/bin/perl
...
...
...
#call a shell script on another server

How can i accomplish #?
Do i have to issue a system (" ssh -l username server | shellscript.sh") in my shell script? or is there a cleaner way to do it?
# 2  
Old 09-13-2006
Quote:
Originally Posted by new2ss
Hi all,

i have a perl script one server. I am running a cronjob to execute my perl script.
Code:
#! /usr/bin/perl
...
...
...
#call a shell script on another server

How can i accomplish #?
Do i have to issue a system (" ssh -l username server | shellscript.sh") in my shell script? or is there a cleaner way to do it?
one way is to use Net::Telnet module , if you enabled telnet on Box B.
an example here

or you could use Net::SSH::Perl module
example here
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Open Source

Shell script file movement to a Mail Box server using ftp commands

Hi All, I have a current Process that runs "windows script " for the file movement that needs to changed to a "DataStage Process (Using shell script )" Source :Text file is getting generated as part of Datastage Jobs processes and resides in a shared drive (Unix server) Target :ftp... (2 Replies)
Discussion started by: developer.dwh9
2 Replies

2. Shell Programming and Scripting

Notify when the script run(hourly)on my jump-box only when there is a failure on my remote-box

Team, Presently I have a script, which i have set up cron on one of my Jump-boxes,and gives me the output on every hourly basis,fetching the data from the remote machine.Basically it gives me the list of all active users logged and its count once we execute the script.Here the count is... (6 Replies)
Discussion started by: whizkidash
6 Replies

3. Shell Programming and Scripting

Invoking one shell script from another unix box

Hello All, I have a shell script A which is in one unix box. Also i have a script B in another unix box. Now i'm struggling to find a way to invoke A shell script from B shell script. Is it possible to do this in any way..Request you anybody please help me in this point. Thanks in advance. (6 Replies)
Discussion started by: RSC1985
6 Replies

4. Shell Programming and Scripting

ftp file starting with particular name on Windows box to Unix box using shell script

Hello all ! I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
Discussion started by: vijayb4u83
2 Replies

5. Shell Programming and Scripting

calling a ksh script present in different unix box

Hi , I have a shell script which does some calling of procedures once all the procedures are called I need to start another ksh script which is present on a different unix box How can this be done ? Do I need to open a telnet session to connect to that box in my first script and... (1 Reply)
Discussion started by: Navatha
1 Replies

6. Linux

Local shell script need to be executed on a remote linux box

I need to execute a shell script on a remote linux box. But the shell script resides on the local linux box where I am currently logged in. Is there a way to do this? I know rsh <host> <command> can execute a command on the remote host. (6 Replies)
Discussion started by: rajeshomallur
6 Replies

7. Shell Programming and Scripting

FTP Unix Box to Windows Shell Script

Hello All, Could someone help me out with this? I want to incorporate this into an existing script so the output of a SAS job can be ftp'd from our UNIX box to a directory on a drive in Windows environment. Can this be done with no extra third party software? We currently use Putty for copy... (2 Replies)
Discussion started by: Jose Miguel
2 Replies

8. Shell Programming and Scripting

calling a unix script in one box from another box

i have a unix script which is available in a box say box1 i want this script to be run in box box2 and put the output file in box2 what is the procedure to execute this script in box2 i will call the script in box1 using cybermation (1 Reply)
Discussion started by: trichyselva
1 Replies

9. UNIX for Advanced & Expert Users

concurrency issue while Accessing Mail Box from shell script

Hi Bros, I am in a serious trouble with concurrency issue while using mailx. I have a shell script which reads all the emails of a unix user account and create a copy (another mbox for processing and archive purpose). This script works fine for 99.99% of the time but sometime it start creating... (2 Replies)
Discussion started by: Sumit_Fundoo
2 Replies

10. Shell Programming and Scripting

Script to Reboot a linux box from a windows box

HI All, I need a script to reboot a linux box from a windows box. The script needs to run automatically whenever a sitescope alerts with an error message. Have searched for this in the forums, but could not get something relative. Pls. let me know the various alternatives we have to do... (2 Replies)
Discussion started by: Crazy_murli
2 Replies
Login or Register to Ask a Question