How to create environment variables?What are the conditions
for creating variables?

Answer Posted / siba sankar nayak

We can create environment variable by using export command.
(Also by using set, but difference between set and export
is the which has been exported is being availabe in
cloned/child shell.) export VAR="Welcome"
But problem is this variable has life span of sesson only.
For making it permananet we need to put that in login
script.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you copy a file from one machine to other?

739


How to calculate the number of passed arguments?

724


How do I run a shell script in powershell?

758


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.

2030


What is bash eval?

741


What exactly is a shell?

790


Why is shell scripting important?

744


How to get script name inside a script?

742


How do I open the shell prompt?

832


What is ms powershell?

775


write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?

3785


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?

890


What is the best scripting language?

763


What is shell and terminal?

734


Suppose you execute a command using exec, what will be the status of your current process in the shell?

800