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
Is cmd a shell?
What is the meaning of $1 in shell script?
How to check if the previous command was run successfully?
I have 2 files and I want to print the records which are common to both.
What are the disadvantages of shell scripting?
How do I edit a .sh file?
What is a file basename?
What happens on a system call?
What is an sh file?
What does $@ mean bash?
is this growing field and what is average package in this?
How can I set the default rwx permission to all users on every file which is created in the current shell?
How do you create a shortcut in linux?
Is shell a scripting language?
What are the different types of variables used in shell script?