Date: Fri, 1 Mar 2002 02:32:55 -0600 From: Kyle Martin <mkm@ieee.org> To: freebsd-standards@freebsd.org Subject: wc(1) patch for review Message-ID: <20020301023255.A39275@marvin.idsi.net>
next in thread | raw e-mail | index | archive | help
heres a patch to take care of wc's -m argument, option, which evedently is the same as -c. i left -c in their but it could easily be taken out diff -U 5 /usr/src/usr.bin/wc/wc.1 wc/wc.1 --- wc/wc.1.old Wed Aug 15 04:09:45 2001 +++ wc/wc.1 Thu Feb 28 05:16:29 2002 @@ -41,11 +41,11 @@ .Sh NAME .Nm wc .Nd word, line, and byte count .Sh SYNOPSIS .Nm -.Op Fl clw +.Op Fl clmw .Op Ar .Sh DESCRIPTION The .Nm utility displays the number of lines, words, and bytes contained in each @@ -68,10 +68,13 @@ .It Fl c The number of bytes in each input file is written to the standard output. .It Fl l The number of lines in each input file +is written to the standard output. +.It Fl m +The number of bytes in each input file is written to the standard output. .It Fl w The number of words in each input file is written to the standard output. .El diff -U 5 /usr/src/usr.bin/wc/wc.c wc/wc.c --- wc/wc.c.old Tue Dec 11 16:23:53 2001 +++ wc/wc.c Thu Feb 28 05:11:05 2002 @@ -70,19 +70,22 @@ { int ch, errors, total; (void) setlocale(LC_CTYPE, ""); - while ((ch = getopt(argc, argv, "lwc")) != -1) + while ((ch = getopt(argc, argv, "lwcm")) != -1) switch((char)ch) { case 'l': doline = 1; break; case 'w': doword = 1; break; case 'c': + dochar = 1; + break; + case 'm': dochar = 1; break; case '?': default: usage(); -- Kyle Martin <mkm@ieee.org> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020301023255.A39275>