I added echo command in both files. Then i open new terminal it shows both echo commands. first shows the etc echo command and then shows the other echo commands. that means bashrc in the etc folder runs 1st.
So when i login as root user and type echo $JAVA_HOME it shows the java home value. But when i login as any other user it shows empty value. So that means .bashrc file related to user wise. is it true ?
thanks Henry, Campbell and Tim. I just need to finalized below thing.
there are three file .profiles, .bash_profile and .bashrc . As for my knowledge below is the details of these iles.
1) .profiles = set system wide environmental variables. Executed only for interactive shell. read by many shells
2) .bash_profile = is executed for both interactive and non-interactive shells .
3) .bashrc = . only for bash
i need to if we set up same envirment vriable in both .profile and .bashrc what will happen. For example as below
in .profiles JAVA_HOME = java 1.6
in .bashrc JAVA_HOME = java 1.7
actually i need to get the value from each callback. for example i have a list which contain 10 items. So that means there will be 10 call backs. So each call back i need to access the list and get relevant value. For example for the 1st iteration i need to get 1st value of list, but when callback comes the i value of iteration may changed to different value. So how do i know 1st iteration callback comes which items to get from the list?
I am calling Rest API using AsyncRestTemplate inside a loop. Once callback returns i need to access main thread values. But the issue is i am calling AsyncRestTemplate inside a loop as below .
inside callback i need t oaccess list values. but issue is since this runs inside a loop when callback comes loop may in a different iteration. So how can i access the same values when i am calling exchange methos ?