Accessing Global Env Variable


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Accessing Global Env Variable
# 1  
Old 05-01-2009
Accessing Global Env Variable

Greetings:
I need to remove 'RUBYOPT' env variable to install MacRuby. I see it via $env (tchrc).

I checked my (local) .tcshrc, .login, .profile files: not defined there. Apparently, it's not set locally. I know this RUBYOPT is global, since I can see it in another account on my MacBook Pro.

The only global env setter file I know is /etc/profile. But that's virtually empty.

1) How can/do I find the SOURCE of the RUBYOPT env var definition?
2) How can I find the SOURCE of any environment variable definition (rather than manually check each dot file)?

Regards,

Ric.

Last edited by UncleRic; 05-01-2009 at 04:43 PM.. Reason: Expand Question
# 2  
Old 05-01-2009
How about typing in:
Code:
$ unset RUBYOPT

and the install MacRuby from the same terminal window instead?
# 3  
Old 05-01-2009
Using 'unset...' to remove/unset RUBYOPT doesn't work:

Before:

USER=Ric
LOGNAME=Ric
RUBYOPT=rubygems
COMMAND_MODE=unix2003

...

Entering the command:

[/Users/Ric/workarea/svn/MacRuby-trunk]unset RUBYOPT

Before:
USER=Ric
LOGNAME=Ric
RUBYOPT=rubygems
COMMAND_MODE=unix2003

...
# 4  
Old 05-01-2009
You may want to look in the /etc directory or /etc/default directories for login, profile, etc. files that set the RUBYOPT variable.
# 5  
Old 05-01-2009
What's the startup path of OS X?

Does anyone know the standard startup path of a BSD Unix box?
I have the /etc but it only contains a couple of dot files, non with the RUBYOPT variable. There's no 'default' file.

Puzzled.

Ric.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Treat value of variable as env variable

Hi All, I have a requirement where I have a config file, which contains 2 coulmn.values of first column are environmnet variable, whose value is defined in an environment file. In my script I need to read the config file, and get the value of the config file variable from env file. I... (2 Replies)
Discussion started by: alok2082
2 Replies

2. Programming

design query: where to lock mutex for function accessing global value?

Hi, Suppose I have a function that accesses and increments a global variable . This function is run as part of thread. One locks mutex in the function and unlocks it after the processing is done. Is there any alternative way? Thanks in advance. (1 Reply)
Discussion started by: sanjayc
1 Replies

3. Shell Programming and Scripting

Error during Accessing Global variable inside function

emailid=myemail@xyz.com taskName="DB-Backup" starttime=`date` email() { subject="$taskName" ": " $* " at `date` " mutt -s "$subject" $emailid < /dev/null } email "Starting" #do my stuff email "Finished" The above code gives following error ./dbbackup.sh: line 6: :... (5 Replies)
Discussion started by: nitiraj.rathore
5 Replies

4. Web Development

Deny from env=env-variable Does not work

(Above from Apache docs). On my system, using: SetEnvIf User-Agent Mozilla IsBad=1 Order allow,deny Allow from all Deny from env=IsBad ...I see that environment variable is set (using phpinfo()) but the page is still served. No errors in the Apache logs. (1 Reply)
Discussion started by: gnurob
1 Replies

5. Shell Programming and Scripting

Env variable

Hello, I want to cange env variable on SunOS. I tried: export GONGA=$GONGA:/users/BANK1/basic/queues/SARON_SPACE1 it changed it only localy for my session. when i opened a new session (telnet etc') the old value exist. How can I change it to effact all sessions. Thanks. (2 Replies)
Discussion started by: LiorAmitai
2 Replies

6. UNIX for Dummies Questions & Answers

Looking for application that simplifies for non techie people accessing unix/linux env

Hello all I searched the net but didn't found any application that wrap ssh connection with GUI interface so that non techie people can connect to unix/linux accounts and work with files , so it will looks like there familiar Microsoft windows directory structure . Please don't answer with ..... (6 Replies)
Discussion started by: umen
6 Replies

7. Solaris

Accessing global-zone installed application

Hi, Is it possible to access application installed on global-zone from a non-global zone? Is there any configuration to achieve the above requirement? Tried looking up information but unable to find. Thanks in advance. Eugene (3 Replies)
Discussion started by: srage
3 Replies

8. Solaris

How to access ENV variables of non global zones in global zone???

Hi Guys, My requirement is I have file called /opt/orahome/.profile in non global zone. PATH=/usr/bin:/usr/ucb:/etc:/usr/sbin:/usr/local/bin:/usr/openwin/bin:. export PATH PS1="\${ORACLE_SID}:`hostname`:\$PWD$ " export PS1 EDITOR=vi export EDITOR ENV=/opt/orahome/.kshrc export ENV... (1 Reply)
Discussion started by: vijaysachin
1 Replies

9. UNIX for Dummies Questions & Answers

Env Variable

Hi, I have a doubt on Environment variable. I want to know where and when the envirnment variables are defined? Thanks & Regards, Siba (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

10. UNIX for Dummies Questions & Answers

Is there such thing as Global Env Variable for all users?

Hello im using SunOS and its great , I know I can setenv global environment variable per user but my question is can I setenv global environment variable in more higher level ( maybe some kind of root user or something) so that every users will see the same value of this global env (3 Replies)
Discussion started by: umen
3 Replies
Login or Register to Ask a Question