home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / nn.tar / nn-6.5.1 / contrib / cn < prev    next >
Text File  |  1995-04-29  |  688b  |  22 lines

  1. # !/bin/sh
  2. # Sun Nov 30 22:34:48 EST 1986    (...!sunybcs!gworek / ...!boulder!forys)
  3. # Thu Feb 8   gt6152a@prism.gatech.edu
  4. #             Modefied cn to work with nn (patchlevel 10)
  5. #             NOTE:  You might want to change the following line below:
  6. #             printf "[%3.3s] %-20.20", $2, $1; \
  7. #                                      ^^^^^
  8. #                    This is the max length of the new group name that will be
  9. #                    printed.
  10. #
  11. #    cn - Check for available news, multicolumn style.
  12. #
  13.     nncheck -Q -t | sort +1 -2 |\
  14.         awk '{ \
  15.             printf "[%3.3s] %-20.20s", $1, $2; \
  16.             if ((NR % 3) == 0) \
  17.                 print ""; \
  18.         } END { \
  19.             if ((NR) && (NR % 3)) \
  20.                 print ""; \
  21.         }'
  22.