🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: be.comp.programming
6 messages
6 total messages Started by Gunter Schelfhout Thu, 07 Aug 2003 07:47
ssh en Perl
#4511
Author: Gunter Schelfhout
Date: Thu, 07 Aug 2003 07:47
8 lines
1201 bytes
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.

Iemand een idee.
-- 
Blood, sweat & tears
Re: ssh en Perl
#4512
Author: Roel Schroeven
Date: Thu, 07 Aug 2003 08:22
16 lines
1374 bytes
Gunter Schelfhout 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?!?

-- 
"Codito ergo sum"
Roel Schroeven
Re: ssh en Perl
#4513
Author: Gunter Schelfhout
Date: Thu, 07 Aug 2003 09:50
30 lines
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
Re: ssh en Perl
#4514
Author: karel adams
Date: Thu, 07 Aug 2003 10:25
39 lines
2124 bytes
"Gunter Schelfhout" <nospam@please.com> schreef in bericht
news:4ipYa.53120$F92.5515@afrodite.telenet-ops.be...
> 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...

tja
als ge de oplossing kent
is ieder probleem simpel...
xou d'r niet opgekomen zijn
ofschoon ik dit soort probs al regelmatig heb voorgehad....

thx for sharing
KA
Re: ssh en Perl
#4515
Author: Roel Schroeven
Date: Thu, 07 Aug 2003 10:33
36 lines
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
Re: ssh en Perl
#4391
Author: Elie De Brauwer
Date: Wed, 27 Aug 2003 15:38
27 lines
1684 bytes
On Thu, 07 Aug 2003 07:47:31 +0000, Gunter Schelfhout 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.
> 
> Iemand een idee.


It's all in the quotes 

helios@kafka:~$ ssh root@localhost "perl -e 'print \"hello\\n\";'"
root@localhost's password:
Warning: No xauth data; using fake authentication data for X11 forwarding.
hello
helios@kafka:~$


ssh neemt slechts 1 string als argument


hth
-- 
http://www.de-brauwer.be

remove NOSPAM
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads