On Fri, 2002-12-20 at 06:42, Robert P. J. Day wrote:
> 
>   after looking a bit more at the different ways to invoke
> a bash shell script, i'm curious about whether there are
> legitimate applications for the "non-standard" ways.
> 
>   from the man page for bash, when you run a script normally,
> it runs as a non-login, non-interactive script.  but with
> one or more options, you can run it as a login script, an
> interactive script, or both (options being some combination
> of -l or --login, -i, etc.)
> 
>   running it in one of these ways will get the script to
> possibly consult the startup files like /etc/profile,
> .bash_profile or .bashrc.
> 
>   fair enough, but under what circumstances would someone
> *want* to consult any of those startup or config files when
> running a script?
> 
>   i've always felt that, in order for a script to be robust
> and really portable, it should be affected by as little as
> possible by its calling environment, particularly all of
> the junk people put into their startup files.
> 
>   so i guess the question is, what are the reasonable
> circumstances where someone would *want* to run a script
> as a login or interactive (barring scripts that might be
> explicitly written to run only at login time).
> 

I can't really picture one or the other and the only thing I can think
of is for weird path or environment variables.

Bret



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to