From: Michael Elkins (elkins@aerospace.aero.org)
Date: 09/07/93


From: elkins@aerospace.aero.org (Michael Elkins)
Subject: Re: TCSH  -- no pwd?
Date: 7 Sep 1993 20:00:51 GMT

In article <266chh$1br@agate.berkeley.edu>,
Brion Moss <boss@soda.berkeley.edu> wrote:
>Personally, I just have an alias in my .tcshrc that sets pwd as an alias
>for `echo $cwd`. This not only solves the problem, but it's faster and
>more efficient than having a separate binary to use.
>(pwd isn't a builtin in csh or tcsh on any system I've been on, only in
>sh or bash or whatever.)

Except that if you use amd, or any type of links to nfs mounts, that won't
tell you where you *really* are.

Something like this will work, tho:

        #include <sys/param.h>

        main () {
                char cwd[MAXPATHLEN];

                printf ("%s\n", getwd(cwd));
        }

me

michael elkins elkins@aero.org
computer science and technology subdivision
aerospace corporation tel: +1 310-336-8040
el segundo, ca fax: +1 310-336-4402