From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,447a948bb64464c3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-15 22:08:42 PST Path: bga.com!news.sprintlink.net!coyote.rain.org!coyote.rain.org!not-for-mail From: haltarac@coyote.rain.org (Henri Altarac) Newsgroups: comp.lang.ada Subject: Re: I have a question... Date: 14 Oct 1994 00:38:48 -0700 Organization: RAIN Network Message-ID: <37lci8$pdo@coyote.rain.org> References: <1994Oct07.034523.161470@zeus.aix.calpoly.edu> NNTP-Posting-Host: rain.org X-Newsreader: TIN [version 1.2 PL2] Date: 1994-10-14T00:38:48-07:00 List-Id: David Emery (emery@goldfinger.mitre.org) wrote: : The easiest way to 'solve' this problem is to expand the "~" into the : home directory. The environment variable "HOME" contains the pathname : of the home directory. Thus it's pretty trivial to implement an : operation that replaces (all) occurances of "~" in a pathname with the : string value of HOME. Don't forget that ~user can also be used and expands into user's home directory. : To be more accurate/precise, the best thing to do is to obtain the : pathname to the home directory from the /etc/passwd file, since the : value of HOME could have been changed by the user. The passwd file cannot be used if your system is running the Yellow pages. On SUN, there is a service 'getpwnam' that does the ~user translation. Henri Altarac ----- haltarac@rain.org (805)683-3045