| 1 |
# !/bin/sh |
| 2 |
# Sun Nov 30 22:34:48 EST 1986 (...!sunybcs!gworek / ...!boulder!forys) |
| 3 |
# Thu Feb 8 [email protected] |
| 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 |
}' |