/* * pwd: print working directory */ #include extern char *getwd(char *); main() { register char *p, *q; strlwr(p = getwd((char*)0)); for (q=p; *q; ++q) if (*q == '\\') *q = '/'; puts(p); exit(0); } /* pwd */