From: Ilan Berci Date: 2009-08-08T00:00:37+09:00 Subject: Re: how to "source" a file? Ken Feng wrote: > I have a bash file ~/.myenv that contains environmental variables like: > > export EDITOR=vi > export FOO=bar > ... > > How do I source this file from within a ruby script that starts like? > > #!/usr/bin/ruby > > I could source the file in bash before running the ruby script, but I > prefer that the script do it, in case the user forgets. > > Thx. > > -Ken `source ~/.myenv` at work.. NOT TESTED.. guess ilan -- Posted via http://www.ruby-forum.com/.