Cooper, Vickie wrote:
> Is there a way to issue rexec from a perl script?
> 
> I can issue:  rexec node ls /tmp/aaa.txt
> And this will display aaa.txt if it exists on the remote node when
> issued from the command prompt.
> 
> Then I put this in a script as a system command:
> $sys=system("rexec node ls /tmp/aaa.txt");
> 
> I don't get anything returned and $sys is a -1
> 
> Thanks,
> 
> Vickie Cooper
> 
> Vickie Cooper
> OS/390 Web Services & FOCUS/EDA Technical Support
> Phone:  (425) 957-5502
> Email:   [EMAIL PROTECTED]

        system only returns success or failure. You could use backticks and get 
the output:

                $sys = `rexec node ls /tmp/aaa.tx`

I made this simple script:
#!perl

use strict;
use warnings;

my $sys = `ls`;
printf "%s", $sys;

chomp(my $MyAns = <STDIN>);

        this displayed all the files from where I started this script. Displays 
all and then waits for you to carriage return to exit out.  This is for double 
click.

Wags ;)


*******************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
*******************************************************

  • rexec from perl Cooper, Vickie
    • Wagner, David --- Senior Programmer Analyst --- WGO

Reply via email to