Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[KSH &C.] - Passaggio variabile tramite remsh [Risolto]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
berus
Guru
Guru


Joined: 28 Dec 2003
Posts: 347
Location: Italy

PostPosted: Mon Nov 07, 2005 10:47 am    Post subject: [KSH &C.] - Passaggio variabile tramite remsh [Risolto] Reply with quote

Prendiamo in esempio il seguente scrippppt..
Code:
#!/bin/ksh

HOST='uname -m' #restituisce client1
xhost +

remsh server '. .profile; DISPLAY=client1:0.0; export DISPLAY; /usr/apl/myapl'
Come posso passare la variabile $HOST al comando remoto così da avere client1 dopo DISPLAY=? Ho provato un
Code:
remsh server '. .profile; DISPLAY=$HOST:0.0; export DISPLAY; /usr/apl/myapl'
ma giustamente non funziona :oops:

Grazie! :roll:


Last edited by berus on Mon Nov 07, 2005 3:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Mon Nov 07, 2005 2:44 pm    Post subject: Reply with quote

Credo che il problema sia negli apici singoli che non permettono l'espansione delle variabili:

Hai provato così:

Code:
remsh server ". .profile; DISPLAY=$HOST:0.0; export DISPLAY; /usr/apl/myapl"

_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
berus
Guru
Guru


Joined: 28 Dec 2003
Posts: 347
Location: Italy

PostPosted: Mon Nov 07, 2005 3:34 pm    Post subject: Reply with quote

Che stupido!!! Il problema era quello.. associato all'uname -m che non so da dove l'abbia preso.. associato agli apici inversi di HOST (gira anche su SUN). :oops:
Grazie!!
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Mon Nov 07, 2005 9:31 pm    Post subject: Reply with quote

berus wrote:

Grazie!!


Figurati :)
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum