From c15b3edf55ebd915b234e2ee6280a19874a052f9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 27 Nov 2007 00:57:42 -0600 Subject: Patch from Charlie Shepherd to add basename and dirname. (Fixed up to apply.) --- toys/dirname.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 toys/dirname.c (limited to 'toys/dirname.c') diff --git a/toys/dirname.c b/toys/dirname.c new file mode 100644 index 00000000..454a5d67 --- /dev/null +++ b/toys/dirname.c @@ -0,0 +1,8 @@ +#include "toys.h" +#include + +int dirname_main(void) +{ + puts(dirname(toys.optargs[0])); + return 0; +} -- cgit v1.2.3