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

Why do we use shell scripting?

757


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

859


What is the difference between scripting and coding?

756


Explain about shebang?

833


What does chmod do?

772


What does the sh command do?

836


Is shell scripting easy to learn?

781


How can I set the default rwx permission to all users on every file which is created in the current shell?

1208


Explain about the exit command?

770


what is info area how many types?

2521


What is .sh file in mac?

781


How do I run a shell script in powershell?

794


What makes c shell a more preferable option than the bourne shell?

764


What command needs to be used to take the backup?

773


Is shell and terminal the same?

821