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
How to check if the previous command was run successfully?
What is sed in shell script?
What does debug script mean?
What does echo mean in scripting?
What is difference between bash and shell?
Is powershell a bash?
What is the purpose of scripting?
Is shell a scripting language?
How do I run a shell script in powershell?
Write a shell script to get current date, time, user name and current working directory.
How does shell scripting work?
What are the advantages of shell script?
What does echo $0 do?
Explain about return code?
write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?