[net.sources] cn -- a checknews script

uggworek@sunybcs.UUCP (12/01/86)

Here's a cute little shell script that lists available news
articles in multicolumn form, such as:

[31] comp.lang.c        [ 1] wny.yumyum         [ 2] mod.sources        
[ 4] comp.unix.questio  [ 1] comp.unix.wizards  [ 1] mod.computers.sun  
[ 2] mod.computers.wor  


The script uses rn's -c and -s options.  It's based on an
alias by Jeff Forys at CU/Boulder.

--------------------------- cut here --------------------------------
#! /bin/sh

# Sun Nov 30 22:34:48 EST 1986	(...!sunybcs!gworek / ...!boulder!forys)
#
#	cn - Check for available news, multicolumn style.
#

	rn -s250 -c | \
		awk '{ \
			printf "[%2.2s] %-17.17s  ", $5, $4; \
			if ((NR % 3) == 0) \
				print ""; \
		} END { \
			if ((NR) && (NR % 3)) \
				print ""; \
		}'
--------------------------- cut here --------------------------------