On Thu, Jul 15, 2010 at 2:35 PM, Intransition <transfire / gmail.com> wrote:
> Any advice on how a ruby script can set a config info that's per
> parent process. In other words I want to be able to do something like:
>
>  foo
>  >
> Then...
>
>  foo 10
>
> Which will store 10 somehow. And when I run foo again it can output
> 10.
>
>  foo
> 0
>
> But if I close my terminal and/or open a new terminal then it will
> have it's own setting.
>
>  foo
>  >
> Thanks.
>
>

$ env FOO="something" sh
$ echo "${FOO}"
something
$ exit
$ echo "${FOO}"

$ env FOO="string for ruby to print" ruby -e 'puts ENV["FOO"]'
string for ruby to print
$ echo "${FOO}"

$