What is the difference between a shell variable that is
exported and the one that is not exported?

Answer Posted / seshadri sethi

The Shell variable which is exported would available to all
the programs outside the Shell also. And the shell variable
which is not exported, would available for that shell or for
the shell program only, in which the variable is declared.



Export LANG=C
will make the variable LANG the global variable, put it into
the global environment. All other processes can use it.

LANG=C
will change the value only in the current script.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?

716


What is the first line in every perl script called?

557


What is k shell?

534


What makes c shell a more preferable option than the bourne shell?

542


Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.

569






How do I run a script from command prompt?

562


What lives in a shell?

539


What is the conditional statement in shell scripting?

661


How can I send a mail with a compressed file as an attachment?

556


What is the default ubuntu terminal?

624


What are the advantages of shell script?

522


What are the different communication commands available in the shell?

519


What does $1 mean in bash?

614


Hello all, This is my assignment on shell scripting, can anyone help me regarding this ? Create a shell script which connects to the database In second shell script include the first script for the DB connection Create a table (PRADEEP_DATA) with 2 columns (name, value) In Third shell script include the first script for the DB connection And insert/delete the values from the Table, by accepting input from the user This functionality should be a menu driven Program: 1) Insert to the database a. Name b. value 2)Delete from the database a.Name b.value Exception handling needs to be taken care.

1855


What is meant by $1 in shell script?

549