Re: change environment variable via script

Páxina inicial
Anexos:
Mensaxe orixinal
+ (text/plain)
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Alex Dean
Data:  
Para: Main PLUG discussion list
Asunto: Re: change environment variable via script

On Dec 23, 2005, at 11:00 AM, Victor Odhner wrote:

> Be careful not to put an "exit" in the "dotted" script, since that
> will end your session.


I realized that the first time I ran it. My terminal quit. :) I
haven't looked into this, but I imagine shell functions support some
kind of 'return' value instead of 'exit'?

On Dec 23, 2005, at 11:04 AM, Eric Shubes wrote:
> Alternatively, you could have done:
> $ . ./cvsswitch two
>
> Notice the '. ' before the command, which executes the command in
> the current shell without starting a new one.


Thanks to all who have responded. The programming isn't hard, but
the shell environment is a little different from things I'm used to
developing (web apps w/ PHP mostly). It underscores the fact that
understanding the context a program will run in is critical.

alex
.



---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss