NEWSCNT
Section: User Commands (1)
Updated: LOCAL
Index
Return to Main Contents
NAME
newscnt - count unread network news based on user's newsgroup
choices
SYNOPSIS
newscnt
[
-{sta}
] [
-x
] [
-f
alt_.newsrc ] [
-n
newsgrp ...]
DESCRIPTION
Newscnt
provides a count of unread network news. By default, the user's .newsrc
file is examined to determine a list of newsgroups. These newsgroups
are then matched against the list of articles that the user has read
and a count of available unread news articles is determined. The
program writes to stdout either "No news." if there are no unread news
articles, or "nnn news articles." to indicate the number of
unread articles. Options
are provided for altering the format in which the count(s) are
returned and the inputs the program works from.
The following options are supported:
- -{sta}
-
These three options, only one of which may be specified at a time,
affect the output format of the program.
-
- s
-
The silent option -- nothing is written to stdout. Only the
program's normal return codes are provided, e.g. a 1 if there is
no unread news, a 0 if there is unread news, or a -1 if
there was an error in the processing.
- t
-
The terse option -- only the total number of unread news
articles (including zero if there are no unread news articles) is
written to stdout. No other text is written.
- a
-
The all option -- in addition to a report of the total number of
unread news articles, the program writes a line of the form
"newsgroup: nnn articles" for each newsgroup having one or
more unread news articles.
- -x
-
This flag causes the program to ignore the articles that the user has
already read in each newsgroup and report the total number of articles
available in the newsgroup. The effect is similar to the -x
flag on most news reading programs.
- -f alt_.newsrc
-
When this option is specified, the file alt_.newsrc is used
instead of the user's $HOME/.newsrc file.
- -n newsgrps ...
-
When this option is specified, the newsgrps specified on the
command line are reported on. By default, the program searches
through the specified or default .newsrc file for a line that begins
with the word options. This options line is parsed for the
list of newsgrps following a -n argument. Any
newsgrp, either from the command line or from the .newsrc file,
prefaced with an exclamation point will be specifically excluded from
the computation. This is useful for excluding "embedded" newsgroups.
(NOTE: A newsgrp is taken as the "prefix" to a set of
newsgroups and all newsgroups with that prefix are automatically
included in the count.)
FILES
/usr/lib/news/active
$HOME/.newsrc
CAVEATS
This program makes use of the /usr/lib/news/active file to determine
the available news items and not the actual news directory's contents.
Consequently, its answers may be off slightly if the active file does not
accurately track the available news articles. If you are told
you have unusually large amounts of unread news, use the -a option to
pinpoint the newsgroup(s) with unusual counts
and then check to see if there are unexpired
articles causing an unusually large "range" in the active file.
The .newsrc format is interpreted according to the author's understanding of
that file's format. Variations in how this file is interpreted may exist.
AUTHOR
Glen A. Taylor
AT&T (Consumer Products Divsion)
May 1986
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- FILES
-
- CAVEATS
-
- AUTHOR
-
This document was created by
man2html,
using the manual pages.
Time: 21:51:53 GMT, February 02, 2023