On 2018-11-08 9:51 p.m., D&R wrote:
> I have tried several ways to connect to remote computer:
>
> $SERVER = qx{ssh -o ConnectTimeout=2 -o ControlPersist=yes $user\@$server
> "sudo hostname| cut -d "." -f1"}; chomp ($SERVER);
>
> but commands that have metacharacters, especially the single quote,
I have tried several ways to connect to remote computer:
$SERVER = qx{ssh -o ConnectTimeout=2 -o ControlPersist=yes $user\@$server
"sudo hostname| cut -d "." -f1"}; chomp ($SERVER);
but commands that have metacharacters, especially the single quote, I can not
get to work.
I can run the following