ec1052fbc399fbd048a91ef2a87d49a5e14e735a
hiram
  Tue May 28 10:01:43 2013 -0700
improve usage message to include with userUtils refs #9149
diff --git src/utils/aveCols/aveCols.c src/utils/aveCols/aveCols.c
index 9e609d4..47e1d85 100644
--- src/utils/aveCols/aveCols.c
+++ src/utils/aveCols/aveCols.c
@@ -1,53 +1,55 @@
 /* aveCols - Add together columns. */
 #include "common.h"
 #include "linefile.h"
 
 
 void usage()
 /* Explain usage and exit. */
 {
 errAbort(
   "aveCols - average together columns\n"
   "usage:\n"
   "   aveCols file\n"
-  "File may be stdin.");
+  "adds all columns (up to 16 columns) in the given file, \n"
+  "outputs the average (sum/#ofRows) of each column.  <fileName> can be the\n"
+  "name: stdin to accept input from stdin.");
 }
 
 void aveCols(char *fileName)
 /* aveCols - Add together columns. */
 {
 struct lineFile *lf;
 char *words[16];
 int wordCount;
 double totals[16];
 int maxCount = 0;
 int i;
 int lineCount = 0;
 
 if (sameString(fileName, "stdin"))
    lf = lineFileStdin(TRUE);
 else
    lf = lineFileOpen(fileName, TRUE);
 for (i=0; i<ArraySize(words); ++i)
      totals[i] = 0;
 while ((wordCount = lineFileChop(lf, words)) != 0)
     {
     if (maxCount < wordCount)
         maxCount = wordCount;
     for (i=0; i<wordCount; ++i)
         totals[i] += atof(words[i]);
     ++lineCount;
     }
 for (i=0; i<maxCount; ++i)
      printf("%7.3f ", totals[i]/lineCount);
 printf("\n");
 }
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 if (argc != 2)
     usage();
 aveCols(argv[1]);
 return 0;
 }