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

Can you write a script to portray how set –x works?

0 Answers  


What is Linux language details

0 Answers   Quick Heal,


What is an sh file?

0 Answers  


When you login to a c shell, which script would be run first?

2 Answers  


How are shells born?

0 Answers  


how to read systems current date and time

4 Answers  


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

0 Answers  


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..

0 Answers   Tech Mahindra,


how do you write sql queries using shell script for eg:- we have databae table like EMPNO,ENAME,SAL,DEPTNO columns in EMP table how you display EMPNO,SAL FIELDS from emp in SHELL SCRIPT please explain with an example

4 Answers  


How to print the first array element?

0 Answers  


How shell works?

1 Answers  


What is @echo off?

0 Answers  


Categories