What is the difference between a shell variable that is
exported and the one that is not exported?

Answer Posted / seshadri sethi

The Shell variable which is exported would available to all
the programs outside the Shell also. And the shell variable
which is not exported, would available for that shell or for
the shell program only, in which the variable is declared.



Export LANG=C
will make the variable LANG the global variable, put it into
the global environment. All other processes can use it.

LANG=C
will change the value only in the current script.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is shell company all about?

752


What is mac default shell?

811


What language is bash written in?

766


What are the zombie processes?

737


Explain about return code?

829


How will you print the login names of all users on a system?

740


Suppose you execute a command using exec, what will be the status of your current process in the shell?

813


What is a beat in a script?

746


What is bash used for?

763


How to debug the problems encountered in the shell script/program?

843


Determine the output of the following command: [ -z “” ] && echo 0 || echo 1

761


What is shell chemistry?

735


What is k shell?

727


What is in a script?

745


Write down the syntax of "for " loop

810