From: Phil Romero Date: 2010-07-16T09:45:37+09:00 Subject: Re: [OT] Setting configuration until end of parent bash session On Thu, Jul 15, 2010 at 2:35 PM, Intransition 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 >  no setting > > Then... > >  $ foo 10 > > Which will store 10 somehow. And when I run foo again it can output > 10. > >  $ foo >  10 > > But if I close my terminal and/or open a new terminal then it will > have it's own setting. > >  % foo >  no setting > > 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}" $