HOW do you tell KSH is interactive ?
    The Grand Master 
    asg at sage.cc.purdue.edu
       
    Tue Feb 19 03:31:56 AEST 1991
    
    
  
In article <1991Feb18.070424.6054 at noose.ecn.purdue.edu> you write:
>In my .profile I set "export ENV=~/.kshrc".  Certainly I don't want
>the aliases or something to executed for non-interactive shell, i.e.
>the shell spawned to interprete the ksh-scripts.  Is there a way to 
>tell if the shell is interactive wone ithin .kshrc ?
>
>Thanks,
>--Jun
>P.S. testing PS1 didn't work.  
>--
>-- Jun Lu                          Internet:luj at ecn.purdue.edu          --
>-- Aeronautics & Astronautics      Bitnet:  luj%ecn.purdue.edu at purccvm  --
>-- Purdue University		   UUCP:    pur-ee!luj                  -- 
>-- W. Lafayette, IN 47907          Phone:317-494-9410  Fax:317-494-0307 --
Get ready, this is really weird:
put these two lines in your .profile:
START=$HOME/.kshrc
ENV='${START[ (_$- = 1) + (_ = 0) - (_$- != _${-%%*i*}) ]}'
export START ENV
 
		Bruce Varney
		  The Grand Master
    
    
More information about the Comp.unix.shell
mailing list