[comp.unix.internals] $ENV: ?? What does that mean?!!

ARCARDW%INDSVAX1.BITNET@uicvm.uic.edu (DUDE OF TIME) (10/31/90)

 Yes, its me again.   What does $ENV: mean in Korne Shell???

Is it a path to environment file??? or what????


HELP!

Paul.

SYKLB%NASAGISS.BITNET@cunyvm.cuny.edu ( Ken Bell) (10/31/90)

When the Korn shell starts up, if it's a login shell, then your
.profile is executed, otherwise it isn't.  If you want to have
something that is executed on every login (like the .login in
the C shell), then you put it in an .environment file, and you
can specify the name of that file in the ENV environment variable.

If you want, for example, to define aliases that will always
"be there for you", you must do that in an .environment file,
otherwise, any shells other than the original login shell won't
have them defined.

Ken Bell (SYKLB@NASAGISS * SYKLB@NASAGISS.GISS.NASA.GOV * 212-678-5545)
Acknowledge-To: <SYKLB@NASAGISS>

protin@pica.army.mil (Arthur W. Protin Jr.) (11/05/90)

Ken Bell <SYKLB%NASAGISS.BITNET@cunyvm.cuny.edu> sent this piece
of MISINFORMATION:
> When the Korn shell starts up, if it's a login shell, then your
> .profile is executed, otherwise it isn't.  If you want to have
> something that is executed on every login (like the .login in
> the C shell), then you put it in an .environment file, and you
> can specify the name of that file in the ENV environment variable.

I think what he meant to say was 
> .profile is executed, otherwise it isn't.  If you want to have
:                                            If you want to have
: something that is executed on every shell startup (like the .cshrc in
: the C shell), then you put it in a file, and you
: specify the name of that file in the ENV environment variable.

What the Korn Shell man page says is:

    ENV     If this parametere is set, then parameter substitution is
            performed on the value to generate the pathname of the script
            that will be executed when the shell is invoked. (See "Invocation"
            below.)  This file it typically used for "alias" and "function"
            definitions.


REMEMBER: Read the Fine Manual,
and then Quote the Fine Manual.

Arthur Protin <protin@pica.army.mil>
These are my personal views and do not reflect those of my boss
or this installation.

mahrk@ccicpg.UUCP (Mark Hull-Richter) (11/15/90)

In article <24894@adm.BRL.MIL>, ARCARDW%INDSVAX1.BITNET@uicvm.uic.edu (DUDE OF TIME) writes:
> 
>  Yes, its me again.   What does $ENV: mean in Korne Shell???
> 
> Is it a path to environment file??? or what????
> 
> HELP!
> 
> Paul.

Well, if you would RTFM I think you would find the answer fairly easily.
I quote:

	ENV  If this variable is set, then parameter substitution is
	     performed on the value to generate the pathname of the
	     script that will be executed when the shell is invoked (see
	     Invocation, below [in the man page, not here]).  This file
	     is typically used for alias and function definitions.

This is why it is usually a good idea to RTFM before making a world-wide
public humiliating spectacle of oneself.

Vicious?  Acerbic?  Sarcastic?  Not me - I just call 'em as I see 'em.

Oh, and by the way, it's Korn shell (after its author, Dave Korn).

-- 
Mark A. Hull-Richter, Software Engineering Specialist I  (714)458-7282x539
ICL, 9801 Muirlands Boulevard, Irvine, CA  92713
                             To err is human; to forgive is not my policy.
UUCP: ccicpg!mahrk (alt: ccicpg!{lanski|al}!mhr)        flames > /dev/null