in reply to Re^2: run perl script with cmd line in shell
in thread run perl script with cmd line in shell
Just wanted to add that due to the way ssh executes commands, you may need to shell-quote your command line arguments twice if they have _any_ odd characters:
% ssh someserver perl - "foo bar" < localscript.pl $VAR1 = [ 'foo', 'bar' ]; % ssh someserver perl - "foo (bar)" < localscript.pl bash: -c: line 0: syntax error near unexpected token `(' bash: -c: line 0: `perl - foo (bar)' % ssh someserver perl - '"foo (bar)"' < localscript.pl $VAR1 = [ 'foo (bar)' ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: run perl script with cmd line in shell
by icoder (Novice) on Apr 18, 2012 at 08:42 UTC |