On Tue, 10 Sep 2002, alexis Vasquez wrote:

> need to assign the TERM variable depending on if user
> is on console TERM=scoansi, but if it's on terminal
> 'pts/#'  then TERM=vt100.. 
> In .bash_profile I saw this.
> 
> if [ -f ~/.bashrc ]; then
>         . ~/.bashrc
> fi
> 
> so I did 
> get the value for command 'tty' "Don't know how to do
> this" to the variable tty-type. 
> 
> if tty-type in 'tty[1,2,#]' ; then
>  TERM=scoansi
> else
>  TERM=vt100
> fi
> 
> ---  also did
> 
> if TERM="linux" ; then  
>  TERM=scoansi
> else
>  TERM=vt100
> fi
> 
> IT doesn't work.. tried to read the man bash but
> overhelm me.   plz.  give some tips for programin.
> 

Hi Alexis, 
Your second script just needs to be changed a bit on the 'if' line. 

It should read:

> if [ $TERM == "linux" ] ; then


Here's what my machine said:

$ if [ $TERM == "linux" ];then echo yes; else echo no; fi
no
$ if [ $TERM == "xterm" ];then echo yes; else echo no; fi
yes
$ if [ $TERM == "tty1" ];then echo yes; else echo no; fi
no
$ 

Hope this helps.

-- 
Arend






_______________________________________________
Seawolf-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/seawolf-list

Reply via email to