What is the difference between a shell variable that is
exported and the one that is not exported?
Answers were Sorted based on User's Feedback
Answer / madhavi
the major difference between the shell variable that is
exported and not is variable exported using export command
is global to all shell,where as the other shell variables
are local to their respective shells.
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / 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 |
Answer / shimpi
Exported variable is like GLOBAL variable which can be used
across teh scripts and UNIX servers.
Whereas Unexported variable can be the used within the
defined script itself.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / narendrasairam
What that makes the difference is its Access Scope.
An exported variable is available across the scrips unlike
an unexported one which is local to the script.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / tony
By default, Shells will only keep all variables to the Shell in which they run. This is good, since it assumes variables are not needed outside of a given script. In most cases, that is correct. But, if you have a script that you want to use to set Shell variables, it must be exported in some way. Alternative ways to export variables, is to call a script with "source" or just with a dot and a whitespace.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / guest
Chile process will inharite the variable and its value v/s
will not inharit
Is This Answer Correct ? | 1 Yes | 2 No |
Explain how you Automate your application using Shell scripting.
Tell something about the super block in shell scripting?
What is the best scripting language?
How can I Debug a shell scripts and Perl scripting?? or How do you debug a shell scripting and perl scripting ( at the compile time error or run time error) in Unix environment ?
Why do we use shell scripting?
What does chmod do?
if i have 2 files file1 and file2.... file1 contains 2 columns like b a 11 aa 12 as 13 ad 15 ag 11 ar 13 ah 15 ak file2 contains b c 10 ds 11 at 15 gh 15 jk 13 iu 11 fg 13 yy can any 1 give me the program to display in this way? a b c aa 11 at ar 11 fg ad 13 iu ah 13 yy ag 15 gh ak 15 jk
shell script for reverse the string
What does $@ mean in shell?
How to print some text on to the screen?
What command needs to be used to take the backup?
What is path variable bash?