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 can I send a mail with a compressed file as an attachment?
How do I open a jshell in cmd?
What is mac default shell?
How to pass an argument to a script?
What is bash used for?
What is the syntax of "nested if statement" in shell scripting?
Which shell is the best?
What are filters explain sort with all the options available?
What does path stand for?
What language is bash written in?
What does egrep mean?
Is shell script a programming language?
Write down the syntax for all the loops in shell scripting.
c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l
Differentiate between ‘ and ” quotes.