You Have Unread News—tknewsbiff
biff
is a UNIX program that reports when mail is received. In its fancier forms, it can pop up a picture of the sender or play an audio clip. If you receive mail from your boss, for example, you could have biff
shout “Red Alert!”
tknewsbiff
is a script to do the same thing but for Usenet news. When you have unread news, an audio clip can be played or some other action can be taken. By default, newsgroups with unread news are shown in a window along with the numbers of unread articles. Here is an example:
Figure 20-1.
tknewsbiff
is quite different from the other examples in this book. The script is customizable by additional Tcl commands supplied by the user. Customizations are stored in the file ~/.tknewsbiff
. A simple version might look like this:
set server news.nist.gov set delay 120 set server_timeout 60 set height 10 watch comp.unix.* watch *.sources.* watch dc.dining ignore *.d
The first four commands set variables that control how often tknewsbiff
checks for news, the news server to check, how long to wait for a response, and the maximum number of newsgroups to display at a time in the window. There are other variables which I will mention later. All are defined using set
commands.
Next are definitions of which newsgroups to watch. The first command requests that all of the comp.unix groups be watched. Next is a pattern which matches all of the ...
Get Exploring Expect now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.