blob: b33836b623238242bc905825070c70951473e33a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
/* vi: set sw=4 ts=4: */
/* dirname.c - print directory portion of path, or "." if none.
*
* See http://www.opengroup.org/onlinepubs/009695399/utilities/dirname.html
*/
#include "toys.h"
#include <libgen.h>
int dirname_main(void)
{
puts(dirname(*toys.optargs));
return 0;
}
|