Linux/C/getenv

From: Anakin (harme_at_gloryroad.net)
Date: 08/25/03


Date: Mon, 25 Aug 2003 13:12:51 -0400

I'm trying to take a user-entered string, and convert any system
variables to their contents for use in my program. What's a good way
to accomplish this with as few libraries as possible? In other words,
how would I translate "$HOME/Notebooks" to "/home/matt/Notebooks" ?
I'm trying to do this with gcc with plain ole C code on a linux box -
but it would be nice if this was generic enough to work on all
compilers.

thank you!
-M



Relevant Pages

  • Re: Install GRUB4DOS into image file
    ... WHAT IT IS YOU'RE TRYING TO ACCOMPLISH ... ... overwrite the MBR using the Linux boot manager. ... to keep the win2k MBR and bootup. ... you elect to create a boot floppy. ...
    (comp.os.linux.setup)
  • Minimizing X to load faster
    ... the people on what can be done (or what else can I read to accomplish ... A company I'm working for is building a device which will run linux ... however since Qt2.3.0 that Kylix uses doesn't support anti-aliasing I ... compressing some part of the distribution and loading it into RAM ...
    (comp.os.linux.x)
  • Minimizing X to load faster
    ... the people on what can be done (or what else can I read to accomplish ... A company I'm working for is building a device which will run linux ... however since Qt2.3.0 that Kylix uses doesn't support anti-aliasing I ... compressing some part of the distribution and loading it into RAM ...
    (comp.os.linux.embedded)
  • Re: Serious Question - Mainstream Use - No Troll
    ... WinDVD are coming out soon for Linux, ... What is it that you can't accomplish with what SuSE ... Only because you're so oriented to Windows. ... the latest nVidia driver doesn't support my Via KT600 ...
    (alt.os.linux.suse)
  • Re: Redmond morons strike again.
    ... In linux this is probably possible... ... can't say I've seen a command in DOS that ... Perhaps it could be done with advanced batch ... to accomplish the task. ...
    (sci.electronics.design)