This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trouble Migrating from Windows to Linux


In Linux, you can use the glob/wordexp functions for this, or do it
yourself with getenv.

On Sat, May 16, 2009 at 11:35 AM, Ian Lance Taylor <iant@google.com> wrote:
> James Cobban <jamescobban@sympatico.ca> writes:
>
>> while on Linux it reads:
>> ? ? ? "~/Windows/Archives/Database/SubDistTable1881.csv"
>> and writes to:
>> ? ? ? "~/Windows/Archives/Database"
>
> Note that on Linux/Unix the name "~" is not special when you call open
> or fopen or similar functions. ?The name "~" is expanded by the shell;
> specifically an unquoted ~ at the start of a pathname, followed by a /,
> is replaced by the contents of the environment variable HOME, or, if
> HOME is not set, by the home directory of the user executing the shell.
> If you are not using the shell, you need to expand "~" yourself.
>
> Ian
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]