Electronics Programming
Linux Posts, Programming Posts, Atmega Posts and others.
Search This Blog
Tuesday, February 24, 2009
Setting, unsetting, using environmental variable in linux
[Setting a env variable]
export VIK=vikas
echo $USER
[using]
if [ ! $VIK ] ; then
echo "not defined"
else
echo $VIK
fi
[unsetting]
unset VIK
if [ $VIK ] ; then
echo $VIK
else
echo "not defined"
fi
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment