pidfile.c: not used anymore
[oweals/busybox.git] / coreutils / length.c
1 /* vi: set sw=4 ts=4: */
2
3 /* BB_AUDIT SUSv3 N/A -- Apparently a busybox (obsolete?) extension. */
4
5 #include <stdlib.h>
6 #include <string.h>
7 #include <stdio.h>
8 #include "busybox.h"
9
10 int length_main(int argc, char **argv);
11 int length_main(int argc, char **argv)
12 {
13         if ((argc != 2) ||  (**(++argv) == '-')) {
14             bb_show_usage();
15         }
16
17         printf("%lu\n", (unsigned long)strlen(*argv));
18
19         fflush_stdout_and_exit(EXIT_SUCCESS);
20 }