User Profile
Collapse
-
Oh man, can't believe I missed that. Thanks for your help Ron, it working fine now. -
Sure, below are my hostnames: -
Code:bash-3.00# ./check.pl $VAR1 = [ 'lonprodd1 ', 'cradevd1 ', 'lonprodgz1 ' ];Leave a comment:
-
Hi RonB
If i explicitly specify a hostname instead of $host it works, but nothing happens when I replace the real hostname with $host variable. Also, no username and password is required as I am using ssh keys to connect to all of the servers in my array.Leave a comment:
-
how to expand a perl variable within a unix command
Hi, i have just started using Perl and I'm trying to expand a perl variable within a Unix command in the perl script, for example: -
I want to use the contents of $host for the hostname...Code:foreach $host (@lines) { print "$host\n"; $sshcmd = "ssh"; $get = `$sshcmd $host "uptime"`; print "$get\n"; }
No activity results to display
Show More
Leave a comment: