[comp.unix.questions] How to skip .env during noninteractive shell startup in sh/ksh?

hsong@nvuxl.UUCP (g hugh song) (01/15/91)

In Csh, noninteractive shell startup skips .cshrc when we put

if (! #?prompt) exit

on top of ".cshrc" file.  I was looking for the same script in Ksh which
does the same thing for ".env" file.   However, in ksh, $PS1 is always
defined no matter what the shell is interactive or not.   Is there any way
to achieve the goal with a short script on top of ".env"?

Thanks.  Please email.

	-hsong-		nvuxl!hsong@bellcore.bellcore.com
		Cc. to:	hsong%nvuxl@bellcore.bellcore.com