Mihai Maties wrote:
On Monday 10 September 2007 16:34:18 Dan Candea wrote:
Mihai Maties wrote:
On Monday 10 September 2007 16:10:29 Dan Candea wrote:
salut

încerc sa citesc $PS1 pe un Suse prin ssh. comanda e mai jos dar nu vrea
sa-mi returneze $PS1

ssh -t -n -ostricthostkeychecking=no hostname /usr/bin/ksh -i -c "test
-f /etc/profile && . /etc/profile; test -f $HOME/.profile && .
\$HOME/.profile; env"
In loc de "env" pune "echo \$PS1". Sau daca vrei neaparat toate
variabilele de environment executa "export" in loc de "env".


Mihai

pai de fapt sunt mai multe servere si nu e numai linux si prin
terminalul de ssh nu-mi returneaza $PS1. am incercat si cu echo \$PS1,
si cu unset TERM.

imi trebuie ceva ce sa mearga pe Solaris, Linux, Unix


OK, si care e problema ? Solutia functioneaza pe Linux, Solaris si HP-UX. Tu ce 
intelegi prin UNIX ?


$ ssh -t [EMAIL PROTECTED] ksh -c 'test -f /etc/profile && . /etc/profile; test -f 
$HOME/.profile && . $HOME/.profile; uname -a; echo PS1=$PS1'

HP-UX host_x B.11.11 U 9000/785 2013079712 unlimited-user license
PS1=>>>
Connection to host_x closed.


$ ssh -t [EMAIL PROTECTED] ksh -c 'test -f /etc/profile && . /etc/profile; test -f 
$HOME/.profile && . $HOME/.profile; uname -a; echo PS1=$PS1'

Linux host_y 2.6.18-4-amd64 #1 SMP Mon Mar 26 11:36:53 CEST 2007 x86_64 
GNU/Linux
PS1=\h:\w\$
Connection to host_y closed.


$ ssh -t [EMAIL PROTECTED] ksh -c 'test -f /etc/profile && . /etc/profile; test -f 
$HOME/.profile && . $HOME/.profile; uname -a; echo PS1=$PS1'

SunOS bumdm1 5.9 Generic_118558-13 sun4u sparc SUNW,Ultra-250
[EMAIL PROTECTED] #
Connection to host_z closed.



Mihai

_______________________________________________
RLUG mailing list
[email protected]
http://lists.lug.ro/mailman/listinfo/rlug

pai la mine nu merge doar daca intru pe el. se pare ca conteaza daca e interactiv sau nu shell-ul. -i trebuie sa rezolve problema, dar...

ssh -t -n -ostricthostkeychecking=no xxxxxx ksh -c 'test -f /etc/profile && . /etc/profile; test -f /$HOME/.profile && . /$HOME/.profile;uname -a;echo PS1=$PS1'
HP-UX xxxxxx B.11.11 U 9000/800 304675952 unlimited-user license
PS1=
Connection to xxxxxxx closed.

ssh xxxxxx
xxxxx:/lfs/opt/nagios $ echo $PS1
xxxxx:$PWD $

ssh -t -n -ostricthostkeychecking=no yyyyyyy /bin/bash -i -c 'test -f /etc/profile && . /etc/profile; test -f /$HOME/.bash_profile && . /$HOME/.bash_profile;uname -a;echo PS1=$PS1' Linux yyyyy 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:32:02 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
PS1=
Connection to yyyyy closed.

ssh yyyyy
Last login: Mon Sep 10 16:39:15 2007 from yyyy
-bash-3.00$ echo $PS1
\s-\v\$


ssh -t -n -ostricthostkeychecking=no zzzzz ksh -i -c 'test -f /etc/profile && . /etc/profile; test -f /$HOME/.profile && . /$HOME/.profile;uname -a;echo PS1=$PS1'
$
AIX zzzzzz 3 5 00332B8E4C00
PS1=
Connection to zzzzzz closed.



--
Dan Cândea
Does God Play Dice?

_______________________________________________
RLUG mailing list
[email protected]
http://lists.lug.ro/mailman/listinfo/rlug

Raspunde prin e-mail lui