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