17 lines
221 B
C
17 lines
221 B
C
#include <stdio.h>
|
|
#include <libgen.h>
|
|
|
|
int main(const int argc, char **argv) {
|
|
|
|
if (argc <= 1) {
|
|
printf("dirname [dirname]\n");
|
|
return 1;
|
|
}
|
|
|
|
for (int i = 1; i < argc; i++)
|
|
puts(dirname(argv[i]));
|
|
|
|
return 0;
|
|
}
|
|
|