Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!spool.mu.edu!news.cs.indiana.edu!news.nd.edu!mentor.cc.purdue.edu!sage.cc.purdue.edu!asg From: asg@sage.cc.purdue.edu (The Grand Master) Newsgroups: comp.unix.shell Subject: Re: HOW do you tell KSH is interactive ? Message-ID: <6178@mentor.cc.purdue.edu> Date: 18 Feb 91 16:31:56 GMT References: <1991Feb18.070424.6054@noose.ecn.purdue.edu> Sender: news@mentor.cc.purdue.edu Reply-To: asg@sage.cc.purdue.edu (The Grand Master) Organization: Purdue University Lines: 26 In article <1991Feb18.070424.6054@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@ecn.purdue.edu -- >-- Aeronautics & Astronautics Bitnet: luj%ecn.purdue.edu@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