Not able to get Environment variable in Ubuntu 11.10 (earlier set in ~/.bashrc) using getenv() - from within a application development tool

1

We are editing ~/.bashrc with command: /home/user> sudo gedit .bashrc

Ravi Chivu

Posted 2012-10-25T08:01:49.917

Reputation: 11

Command used to set the variable? Can you use the terminal command line to read the variable? – Isaac Rabinovitch – 2012-10-25T08:20:22.777

Are you exporting the variable: export VARIABLE=value? – Pedro Romano – 2012-10-25T08:35:12.450

Answers

0

If you set a variable in ~/.bashrc, this file has to be sourced again; typically by logging in again.

If you do not wish to permanently set this variable, set it in the terminal, without editing ~/.bashrc.

In any case, don't forget to use export.

dset0x

Posted 2012-10-25T08:01:49.917

Reputation: 1 897