Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between a shell variable that is
exported and the one that is not exported?

Answer Posted / mahendra swain

When we export the variable that will available in subshell
If simply define variable that is only available in current shell.
Example: #var=20
#echo $var
20
If you invoke #sh i.e subshell of bash and try to print that unexported variable valu you will not get that.
sh-2.05b# echo $var-----it does not print the valu of var b'caz still it is in bash shell memory.
Just see the exported variable in shell
[root@dhcppc0 root]# export var1=30
[root@dhcppc0 root]# sh
sh-2.05b# echo $var1
30
I hope you will be enjoy it.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain piping.

847


What is the ‘nohup’ in unix?

876


What is a parent directory in unix?

863


What is the difference between an absolute path and a relative path in unix?

1000


Differentiate relative path from an absolute path?

858


Why unix is secure than windows?

923


What are special characters in unix?

815


Is mac built on unix?

854


How is unix different from other operating system?

846


List a few significant features of unix?

981


What is unix kernel explain it?

874


What are new features added in nfs4?

925


In what way the protection fault handler concludes?

990


How to null a file in unix?

1091


What is the procedure to configure MC/SG Cluster services in HP-UX 11i v3 OS Environment?

5853