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

What is the way to do multilevel if-else's in shell scripting?

664


c program to display the information of given file similar to givan by the unix or linux command ls -l

1698


What is basename in shell script?

591


Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.

2033


How will you emulate wc –l using awk?

913






What is a shell environment?

577


What is bash coding?

501


Write a command sequence to find the count of each word?

542


Give some situations where typing error can destroy a program?

725


How do we create command aliases in a shell?

542


What is the equivalent of a file shortcut that we have a window on a linux system?

606


Which scripting language is best for automation?

536


I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.

598


Explain about login shell?

636


Explain about debugging?

606