ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
How long have you been doing GNU/Linux & how long have you been doing C?
I don't mean that to sound rude, but ...
There is no "linux shell" per se, only a default linux shell, which is bash. Is this the shell you are referring to?
Also, opening files & reading them is almost the next lesson after "Hello World" in learning a programming language; if you need to do this in C, I suggest a text book. (And, unfortunately, I don't do C, so I can't make any recommendations.)
Finally, are you sure "$(HOME)" is correct syntax? In bash that would be "${HOME}", or "$HOME", or just "~".
I wrote shell scripts before, seldom people call that bash scripts. So when you ask what shell, I also doubt us there any else shell?
Sure, I know how to open/read/write user-defined files in C. However, I don't know how to access environment variables such as $HOME and .adcl in c programming. That's why I post my questin here.
More specified, my question is how to open $HOME/.adcl/config.adcl in C?
Thank you HKO very much.
I don't expect to have the complete or exactly answer here, but you know, any suggestion or advice is a good advice to go ahead in a correct direction. And we can also learn more from others' posts. I thinks that's the reason why many people post questions here.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.