Console/SSH/X: How to tell?

S P Arif Sahari Wibowo arifsaha-/E1597aS9LQAvxtiuMwx3w at public.gmane.org
Sun Jun 21 01:03:46 UTC 2009


On Fri, 19 Jun 2009, Marc Lanctot wrote:
> So what I'd like to do is detect if the session is an 
> xterm/console, or through interactive ssh.. and output the 
> calendar in these cases but not in cases where I scp or 
> execute a command remotely.

case $- in
   *i* )   INTERACTIVE=1 ;;
esac

-- 
    ____  ____  ____  ____ (stephan paul) Arif Sahari Wibowo
   /___  /___/ /___/ /___      http://www.arifsaha.com/
  ____/ /     /   / ____/
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list