Mail Archives: djgpp/1997/01/09/14:26:48
John M. Aldrich <fighteer AT cs DOT com> wrote in article
<32D47DAB DOT 38B1 AT cs DOT com>...
> Jeffrey Taylor wrote:
> >
> > I found part of the problem, I was using "set LFN=n" instead of
"LFN=n".
> > I expected set with no arguments to show these variable values, but it
> > doesn't. However, "echo $LFN" does show the value I expect. Another
> > example, I did:
> >
> > PS1=$HISTCMD\$
> > PS1=bash\$
> > DJGPP=c:/djgpp_v2.01/djgpp.env
>
> I don't know enough about bash to be sure, but I know that in ksh you
> have to explicitly 'export' variables before they become part of the
> shell environment. Does bash have a similar requirement?
Yes. The current shell gets the variable whether you export or not.
Subshells gets the variable only after you export it. Is that how it works
in ksh?
--
Weiqi Gao
weiqigao AT crl DOT com
- Raw text -