in reply to Command Executing problem in perl.
Hi leslie,
I'm having troubles parsing the command line as you wrote it, so maybe your shell is having troubles, too.
What's the command that's supposed to run on the remote machine? I mean: can you tell us how you would write it if you were on the remote machine's shell?
Also, note that the remote shell is trying to redirect output on the file "3/1/12,name=DISASTER_RECOVERY: -av" because of the first > in the command line.
I tried this:
my @cmd = ('ssh', '-x', 'user@remotehost', '"ls -la > mylsfile"'); my @output = qx/@cmd/;
my @cmd = ( 'ssh', '-x', '-i', '~/.ssh/bkp', '<server name>', q[mminfo -q "savetime>3/1/12,name=DISASTER_RECOVERY:\\\\" -av -ot - +r client >/home/rbr/clnts] );
I'm not sure how many \ you will need on that command line (assuming you're trying to put some \ after that colon).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Command Executing problem in perl.
by leslie (Pilgrim) on Jun 28, 2012 at 04:34 UTC | |
by mantager (Sexton) on Jun 28, 2012 at 07:15 UTC |