Link to home
Start Free TrialLog in
Avatar of arijit_rebaca
arijit_rebaca

asked on

write a program in C to show current enviornment variable under linux

Hi,

help me to write a program in C to show current enviornment variable under linux..

thanks,
Avatar of sunnycoder
sunnycoder
Flag of India image

Hi arijit_rebaca,

This is what you are looking for
http://www.die.net/doc/linux/man/man5/environ.5.html

Cheers!
sunnycoder
Avatar of arijit_rebaca
arijit_rebaca

ASKER

no..

I want to write a C code that will show this enviornment variables...

ASKER CERTIFIED SOLUTION
Avatar of sunnycoder
sunnycoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can u write whole code block? it will be helpful for me...

thanks,


Your question history indicates that you are in the process of learning C.
I would be glad to help you code this piece but I wont code it for you.

Also, you should consider managing your open questions and grading history ... 9 Bs out of 10 certainly dont look very encouraging.
https://www.experts-exchange.com/help.jsp#hi73
another hint,
  That environ pointer which sunny pointer is the third paramenter to the main
also see getenv() if you want to retrieve the value of specfic value.

regards
Manish Regmi
Paul - I ABSOLUTELY DISAGREE ON DELETING COMMENTS WITHOUT MENTIONING THAT to the others.

As I side note: I'll ask the admins about that conduct, since not only it is impolite and rude, but also unfair and IMO not justified. Not to speak of professionality here.
Hi PaulCaswell,

Ya.... you r right Paul.... ok I try to rectify myself when I am going to grade an answer... Thanks for recollecting my school days.... specially the teachers who are very very poor to give marks. hahahahhahahahhaha........

rgds,