On Wed, Mar 11, 2009 at 03:36, Nick Guenther <[email protected]> wrote:
> On Tue, Mar 10, 2009 at 11:20 PM, Mike Erdely <[email protected]> wrote:
>> On Tue, Mar 10, 2009 at 11:11:23PM -0400, Nick Guenther wrote:
>>> This confused me for SO LONG. The trick is to "source" the file
>>> instead of running it as so:
>>> . ./script
>>> or
>>> source ./script
>>>
>>> You'd think "EXPORT" exports the value to the entire OS, but no, it
>>> only exports it beyond the that command line. It sort of makes sense
>>> in the context that can do this to pass variables to programs:
>>> $ VAR=VAL ./script
>>>
>>> Unix is crazy.
>>
>> Actually, read my explanation.  It will make sense to you then.
>
> It makes sense in a logical-reductionist way, if you focus on the
> actions and not the words; it's just kind of counter intuitive :)
> -Nick


Yea, I was thinking about it as I wrote the e-mail.  All those months
of PHP class came back and I remembered about global variables.   I
realize that it's not exactly the same, but putting the "echo"
statements got me thinking back to that...  I will remember this in
the future...  In my beginning "C" class, they tell you to put in
"print" statements to see how far your scripts get before failure...


thanks for the help...
Bryan
Bryan
_______________________________________________
Openbsd-newbies mailing list
[email protected]
http://mailman.theapt.org/listinfo/openbsd-newbies

Reply via email to