+#define _POSIX_C_SOURCE 200112L
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
timestr[1023] = 0;
printf("%s", timestr);
break;
+ case 's':
+ printf("%jd", (intmax_t)buf->st_size);
+ break;
case 'a': /* octal mode */
printf("%o", (int)buf->st_mode & 07777);
break;
if (!gr) exit(1);
printf("%s", gr->gr_name);
break;
+ case 'n':
+ printf("%s", filename);
+ break;
+ case '%':
+ putchar('%');
+ break;
default: /* handle unknown formatting character */
printf("%c", f.found);
break;
}
}
if (errflg) {
- fprintf(stderr, "zpm-stat [-f <format>] [-t <timefmt>]");
+ fprintf(stderr, "zpm-stat [-f <format>] [-t <timefmt>]\n");
exit(2);
}
for ( ; optind < ac; optind++) {