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

Raspunde prin e-mail lui