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



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

Answer / 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

More Shell Script Interview Questions

What command needs to be used to take the backup?

0 Answers  


What is bash used for?

0 Answers  


There is a record with fields namely name,roll no.,salary,grade etc.Now,write a script to create a file with multiple records have same combination of fields but with unique roll numbers.The script should work for different names in the input file.

1 Answers   Wipro,


How do I run a shell script on a mac?

0 Answers  


Write down the syntax for all the loops in shell scripting.

0 Answers  






How to take input values from the user?

4 Answers  


What are the different variables present in linux shell?

0 Answers  


RAM one table colums a1,a2,a3,a4 respective values 2,4,7,8 KRISH one table colums a1,a2,a3,a4 respective values 3,4,6,9 IN RAM & KRISH a4 column if comparing values RAM A4 - KRISH A4 ( 8-9 =1 THEN print 5 or (RAM) a4 value 10 KRISH a4 values 2 then 10 -2 =8 print 5*8=40 or diff 5 print same

1 Answers   Tech Mahindra,


What is use of "cut" command?

3 Answers  


What is the use of "test" command?

2 Answers  


Is it possible to substitute "ls" command in the place of "echo" command?

0 Answers  


How will you find the 99th line of a file using only tail and head command?

0 Answers  


Categories