Connecting Tech Pros Worldwide Forums | Help | Site Map

Executing shell script on unix box through perl script executed on windows

Newbie
 
Join Date: Mar 2007
Posts: 1
#1: Mar 6 '07
Hi,
I am newbie to perl, I hope you guys will help me resolve the challenge I am facing.
I have a unix shell script on one UNIX machine say A, and a batch file on windows machine say B. Now I want to write a perl script on windows box which can trigger both, the batch file on B and the script on A

Would you please help me...

Expert
 
Join Date: Apr 2006
Posts: 512
#2: Mar 6 '07

re: Executing shell script on unix box through perl script executed on windows


Quote:

Originally Posted by sunilsn

Hi,
I am newbie to perl, I hope you guys will help me resolve the challenge I am facing.
I have a unix shell script on one UNIX machine say A, and a batch file on windows machine say B. Now I want to write a perl script on windows box which can trigger both, the batch file on B and the script on A

Would you please help me...

you want to write a perl script on Windows machine B right? I assume it is
1) you can call the batch file using system(). Or do a perldoc -q external to see various options.
2) As for calling the unix script at A, you can use Net::Telnet or SSH protocol to execute remote commands. Have a look at telnet eg or Perl SSH eg
Newbie
 
Join Date: Apr 2007
Posts: 7
#3: Apr 20 '07

re: Executing shell script on unix box through perl script executed on windows


you can use a perl script module NET::TELNET
and can connect to that machine and execute the script .
Reply