Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question
In linux, if I am in the bash shell, and I type:
x=2
bash
In the child bash process, I will not have access to x (i.e. I cannot get anything from: $x), unless I issue what command from the original parent shell?
Answer
export x

Question
In linux, if I am in the bash shell, and I type:
x=2
bash
In the child bash process, I will not have access to x (i.e. I cannot get anything from: $x), unless I issue what command from the original parent shell?
Answer
?

Question
In linux, if I am in the bash shell, and I type:
x=2
bash
In the child bash process, I will not have access to x (i.e. I cannot get anything from: $x), unless I issue what command from the original parent shell?
Answer
export x
If you want to change selection, open document below and click on "Move attachment"

9. Processes, Environment Variables
variable. But now run bash You have now run a new process which is a child of the process you were just in. Type echo $X You will see that X is not set. The reason is that the variable was not <span>export ed as an environment variable and hence was not inherited. Now type exit which breaks to the parent process. Then export X bash echo $X You will see that the new bash now knows about X

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.