From 210fe06eec709cd92da345b964c1b3c06e1c531f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 29 Aug 2003 20:42:52 +0000 Subject: [PATCH] Added help message. --- shredtree.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/shredtree.c b/shredtree.c index 761b657..0419e77 100644 --- a/shredtree.c +++ b/shredtree.c @@ -164,7 +164,7 @@ main(int argc, char *argv[]) int status; char *dir = "."; - while ((status = getopt(argc, argv, "cds:w")) != EOF) + while ((status = getopt(argc, argv, "cdhs:w")) != EOF) { switch (status) { @@ -184,8 +184,16 @@ main(int argc, char *argv[]) rws = 1; break; + case 'h': default: - fputs("usage: [-s shredsize] [-w] path", stderr); + fprintf(stderr,"usage: shredtree [-c] [-s shredsize] [-w] path\n"); + fprintf(stderr," -c = check .c, .h, and .txt files only.\n"); + fprintf(stderr," -d = debug, display chunks in output.\n"); + fprintf(stderr," -h = help (display this message).\n"); + fprintf(stderr," -s size = set shred size (default %d)\n", + shredsize); + fprintf(stderr," -w = remove whitespace.\n"); + exit(0); } } -- 2.43.0