hush/coreutils/pwd.c
Eric Andersen 2ce1edcf54 Latest and greatest.
-Erik
1999-10-12 15:42:48 +00:00

19 lines
304 B
C

#include "internal.h"
#include <stdio.h>
const char pwd_usage[] = "Print the current directory.\n";
extern int
pwd_main(int argc, char * * argv)
{
char buf[1024];
if ( getcwd(buf, sizeof(buf)) == NULL ) {
perror("get working directory");
exit( FALSE);
}
printf("%s\n", buf);
exit( TRUE);
}