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 are the different commands available to check the disk usage?
Which shell is the best?
What is @echo off?
What does $0 mean in shell script?
i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..
What is a shell environment?
What is difference between shell and bash scripting?
What can you do with powershell?
What are the 3 standard streams in linux?
What are the different types of shell scripting?
What are scripts in psychology?
What is the syntax of while loop in shell scripting?
Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.
How do we create command aliases in a shell?
What is shell chemistry?