Article View: be.comp.programming
Article #4513Re: ssh en Perl
From: Gunter Schelfhout
Date: Thu, 07 Aug 2003 09:50
Date: Thu, 07 Aug 2003 09:50
30 lines
1907 bytes
1907 bytes
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] -- Blood, sweat & tears
Technical Details
Message-ID:
<4ipYa.53120$F92.5515@afrodite.telenet-ops.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!skynet.be!skynet.be!aotearoa.belnet.be!news.belnet.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>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 02:51:09 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!skynet.be!skynet.be!aotearoa.belnet.be!news.belnet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mail From: Gunter Schelfhout <nospam@please.com> Subject: Re: ssh en Perl Newsgroups: be.comp.programming References: <nunYa.52958$F92.5531@afrodite.telenet-ops.be> <8%nYa.53004$F92.5533@afrodite.telenet-ops.be> Lines: 30 User-Agent: KNode/0.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8Bit Message-ID: <4ipYa.53120$F92.5515@afrodite.telenet-ops.be> Date: Thu, 07 Aug 2003 09:50:56 GMT NNTP-Posting-Host: 213.118.153.61 X-Complaints-To: abuse@telenet.be X-Trace: afrodite.telenet-ops.be 1060249856 213.118.153.61 (Thu, 07 Aug 2003 11:50:56 MET DST) NNTP-Posting-Date: Thu, 07 Aug 2003 11:50:56 MET DST Organization: Telenet Internet