Just i write your code and execute it. But i am not getting. I am in tclsh prompt. My prompt is %. so what i did just type in the prompt % set tmpdir $::env(TMP). The output is like that can't read "::env(TMP)": no such variable
–
galvin VergheseApr 1 '11 at 8:58

Actually i want to write a proc is tcl that returns the Bash environment variable values.
–
galvin VergheseApr 1 '11 at 9:39

1

That's because you have no environment variable called TMP. Did you read the link I gave you?
–
TrojanNameApr 1 '11 at 11:17

Ah, I can see the conversation you're having with the other responder - I think you'll be ok!
–
TrojanNameApr 1 '11 at 11:20

TMP environment variable is define in the bash script. so what i want to do just access the environment variable in the tcl. my tcl prompt is %. so finally i want to access the environment variable in tcl.
–
galvin VergheseApr 1 '11 at 9:03

The TMP enviroment variable would be $env(TMP). But: Is the tcl script called from the bash script? Is the variable global (ie. export)?
–
hynekApr 1 '11 at 9:06

Yea. It is working fine. but my question is that what ever environment variable is defined in bash or shell script just i want to access using the proc in tcl. so please........
–
galvin VergheseApr 1 '11 at 9:08

yea. TMP variable is the environment variable that is defined in bash script. TMP=/tmp ORACLE_SID=DBTEST ORACLE_HOME=/opt/oracle/product/102 export ORACLE_SID ORACLE_HOME so here i want to access the environment variable ORACLE_SID and ORACLE_HOME, so how i should do, please ........
–
galvin VergheseApr 1 '11 at 9:13

So you want a list of all defined shell variables?
–
hynekApr 1 '11 at 9:16

yea, your procedure is executed, it gives all the environment variables. its ok. But what i am asking here. Suppose in bash script if i define the user define environment like this : ORACLE_SID=DBTEST ORACLE_HOME=/opt/oracle/product/102 export ORACLE_SID ORACLE_HOME Now i want to write a proc in tcl to access the environment variable that is defined by user. so how can i do it. please..........
–
galvin VergheseApr 2 '11 at 5:29

I also read u r link. But it is not match with my requirement.
–
galvin VergheseApr 2 '11 at 5:49

I just use parray env when I want to dump environment variables.
–
Donal FellowsApr 2 '11 at 7:34

Here Actually parray is used for print the env values. But what i want how to access the environment variable in TCL, that is defined in bash script, so please help me......
–
galvin VergheseApr 6 '11 at 6:09