Hi, linux newbie here !
I ) Stuck with difference b/w Local Shell variables and Environment variables with respect to BASH only !
Refer here Variables: to section 3.2.1.2. Local variables
II ) CORRECT me if i m wrong : In BASH , Environment Variables = Exported Variables. & and ENVIRONMENT Variables can be viewed with ENV or PRINTENV.
They had compared output of Set and Env comparing the VARIABLES listed.
Now are these Listed variables really Local Variables,and if yes, howcome PS1,PS2 ... which are listed under SET command output, are inherited by BASH Subshells or even new BASH Tabs , whereas in BASH , only exported variables are passed to Child Processes / Subshells.( which we open via gnome-terminal ) ( again Correct ME :S )
and if these variables ( PS1 ) Gotta do with Fork and EXEC procedure, i.e they are being passed to Child Process/SubShell via Fork and Exec,can they be demonstrated....
I tried to do the same , do know the procedure was correct or not.
0)using RHEL 5 | NON interactive Shell ( bash )
1) open bash terminal
2) #monitor=lg
3) #echo $monitor ( value displayed )
4) #exec bash
5) #echo $monitor ( value not displayed )
III ) With Respect to BASH , are Global Variables same as Environment Variables or not.
Note : As per set info page, it displays Local and Environment Variables , Functions , and Shell Parameter Features.
:ashamed:
I ) Stuck with difference b/w Local Shell variables and Environment variables with respect to BASH only !
Refer here Variables: to section 3.2.1.2. Local variables
II ) CORRECT me if i m wrong : In BASH , Environment Variables = Exported Variables. & and ENVIRONMENT Variables can be viewed with ENV or PRINTENV.
They had compared output of Set and Env comparing the VARIABLES listed.
Now are these Listed variables really Local Variables,and if yes, howcome PS1,PS2 ... which are listed under SET command output, are inherited by BASH Subshells or even new BASH Tabs , whereas in BASH , only exported variables are passed to Child Processes / Subshells.( which we open via gnome-terminal ) ( again Correct ME :S )
and if these variables ( PS1 ) Gotta do with Fork and EXEC procedure, i.e they are being passed to Child Process/SubShell via Fork and Exec,can they be demonstrated....
I tried to do the same , do know the procedure was correct or not.
0)using RHEL 5 | NON interactive Shell ( bash )
1) open bash terminal
2) #monitor=lg
3) #echo $monitor ( value displayed )
4) #exec bash
5) #echo $monitor ( value not displayed )
III ) With Respect to BASH , are Global Variables same as Environment Variables or not.
Note : As per set info page, it displays Local and Environment Variables , Functions , and Shell Parameter Features.
:ashamed: