What is the difference between a shell variable that is
exported and the one that is not exported?
Answer Posted / 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 |
Post New Answer View All Answers
What is the default shell of solaris?
What are the different types of variables used in shell script?
What are the different commands available to check the disk usage?
Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.
What is the equivalent of a file shortcut that we have a window on a linux system?
How do you find out What is your shell?
What are the 3 standard streams in linux?
what is info area how many types?
How does path variable work?
What is meant by dos operating system?
What is a file basename?
What does echo mean in scripting?
What is inside a seashell?
What are the disadvantages of shell scripting?
wats the deinitions for shell utility and filter?