From: Ralf Dreier (dreier@fb5.uni-siegen.de)
Date: 03/11/93


From: dreier@fb5.uni-siegen.de (Ralf Dreier)
Subject: Re: 'pwd' in tcsh and csh
Date: 11 Mar 1993 07:14:21 GMT


In article 1njqbqINNa0e@snoopy.cis.ufl.edu, lioness@maple.circa.ufl.edu () writes:
> In article <1993Mar9.213443.1019@organpipe.uug.arizona.edu>, kkc@stat.nursing.arizona.edu (Kee Chua) writes:
> |>
> |>Hi people,
> |> I noticed that when I used 'sh' shell, I have 'pwd' working. But when I
> |>switched to 'tcsh' or 'csh', I can't do a 'pwd'. What's wrong? If 'pwd' is
> |>embedded in the shell and if tcsh and csh doesn't have it, where can I get
> |>one?
> |>
> |>Thanks in advance,
> |>Kee Chua
>
> I noticed that too. I had to do an alias of:
>
> alias pwd 'PWD'
>
> or something like that.
>
> Brian
>

I have written a small program pwd:

/*
 * pwd for Linux
 *
 * Siegen, 29.01.93
 */
#include <stdio.h>

char *cwd, *getcwd();

main() {
        if ((cwd = getcwd((char *)NULL, 256)) == NULL) {
                perror ("pwd");
                exit (1);
        }
        printf("%s\n", cwd);
}

==========================================================================
Ralf Dreier | Universitaet-GH-Siegen
                                                | Institut fuer
email dreier@fb5.uni-siegen.de | Wirtschaftsinformatik
Phone 49 271/740-3262 | Hoelderlinstr. 3
Fax 49 271/740-2310 | D-W-5900 Siegen, Germany