Article View: be.comp.programming
Article #4515Re: ssh en Perl
From: Roel Schroeven
Date: Thu, 07 Aug 2003 10:33
Date: Thu, 07 Aug 2003 10:33
36 lines
2258 bytes
2258 bytes
Gunter Schelfhout wrote: > Roel Schroeven wrote: > >>> Ik tracht remote een klein Perl-script uit te voeren, maar dat lukt niet >>> echt. Zelfs: >>> ssh <destination> perl -e 'print "hallo";' >>> wil niet werken. >> >> :-s werkt hier ook niet. Als ik een klein perl-scriptje maak en dat >> aanroep met >> >> ssh localhost perl hello.pl >> >> werkt het wel?!? >> > > Je zal wel ge�nteresseerd zijn in de oplossing, neem ik aan. > > ssh <destination> perl -e " ' print qq(hallo) ' " > > [quote vanuit comp.lang.perl.misc] > > Using ssh like that results in double parsing of the command line, once > locally and once by the remote server. So your single quotes keep the > print and "hello\n" as one argument locally, but then the shell on > the remote end splits them into two arguments... > > [\quote] Ik dacht al wel dat het iets te maken had met de quotes en de interpretatie daarvan door de shells, maar hoe het juist ineenzat was me nog niet duidelijk. En nog minder hoe het op te lossen. -- "Codito ergo sum" Roel Schroeven
Technical Details
Message-ID:
<0WpYa.53170$F92.5194@afrodite.telenet-ops.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.online.be!newsgate.cistron.nl!skynet.be!skynet.be!skynet.be!skynet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mailReferences:
<nunYa.52958$F92.5531@afrodite.telenet-ops.be> <8%nYa.53004$F92.5533@afrodite.telenet-ops.be> <4ipYa.53120$F92.5515@afrodite.telenet-ops.be>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII X-Google-Thread: fcea4,875a9a7209b8322a X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2003-08-07 03:33:33 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.online.be!newsgate.cistron.nl!skynet.be!skynet.be!skynet.be!skynet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mail Newsgroups: be.comp.programming From: Roel Schroeven <9487zm6802@sneakemail.com> Subject: Re: ssh en Perl References: <nunYa.52958$F92.5531@afrodite.telenet-ops.be> <8%nYa.53004$F92.5533@afrodite.telenet-ops.be> <4ipYa.53120$F92.5515@afrodite.telenet-ops.be> Organization: http://www.catb.org/~esr/faqs/smart-questions.html Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit User-Agent: slrn/0.9.7.4 (Linux) Lines: 36 Message-ID: <0WpYa.53170$F92.5194@afrodite.telenet-ops.be> Date: Thu, 07 Aug 2003 10:33:32 GMT NNTP-Posting-Host: 81.164.241.81 X-Complaints-To: abuse@telenet.be X-Trace: afrodite.telenet-ops.be 1060252412 81.164.241.81 (Thu, 07 Aug 2003 12:33:32 MET DST) NNTP-Posting-Date: Thu, 07 Aug 2003 12:33:32 MET DST