sortix-mirror/utils/pwd.cpp
Jonas 'Sortie' Termansen 081bb6481c Added pwd(1).
2012-03-01 00:27:30 +01:00

13 lines
217 B
C++

#include <stdio.h>
#include <unistd.h>
int main(int argc, char* argv[])
{
const size_t WDSIZE = 4096;
char wd[WDSIZE];
if ( !getcwd(wd, WDSIZE) ) { perror("getcwd"); return 1; }
printf("%s\n", wd);
return 0;
}