|-c||Check if there is news, and if so print You have news..|
|-C||Check if there is news, and print the groups and number of articles in each group to be read.|
|-l||List the titles of available news articles.|
|-p||Print all articles on standard output, and update newsrc.|
|-L||Print the newsgroup subscription list.|
|-Agroup||Add group to the subscription list.|
|-Dgroup||Delete group from the subscription list.|
|The remaining flags mostly determine article selection, and may also appear in the .newsrc file. Options may be specified in the .newsrc file by entering lines prefixed with the word options, followed by the options arguments. This is most useful with the -n flag, specifying the usual groups one wishes to subscribe to.|
|Select all articles belonging to newsgroups. Newsgroups is a comma separated list of newsgroup names. The character ! may be used to exclude certain groups, and the word all can be used to match any group. e.g. -n all,!net.jokes|
|-i||Ignore .newsrc file. It is not read or updated. This allows selection of articles that have already been read.|
|Disable the commands. Commands is a string of command characters (see the next section); entering any command beginning with any of them will result in an error message.|
If no -n option is specified, either by the user or his .newsrc file, the value specified on the defsub line of the control file is used as the list of newsgroups to be presented. A single mandatory newsgroup may be specified as the value of the mustsub control line; in the absence of a command-line -n (not one from a .newsrc), that newsgroup is always presented to the user even if he did not ask for it. Both defsub and mustsub default to general.
This section details the commands available when readnews is in command mode (no -clpsC arguments). The simplest way of using this mode, is to enter RETURN after every prompt. This will present to the user, a short heading for an article, then a prompt. Typing RETURN again will print the article body. Typing RETURN yet again will print the next heading, and so on. If having read the heading, you dont wish to read the article, you may type n (or + or ;) which will take you directly to the next heading.
An article is treated as having been read, if either you have seen the article body, or typed n to skip over it.
A number of commands operate on the current article. This is defined as the article whose header you have most recently seen.
The commands to read news are:
RETURN Either print the current article, or go to the next article and print its header. n or + or ; Go to the next article and print its header. . Print the current article. - Go back to the previous article. This is a toggle, typing it twice returns you to the original article. number Go to the article number in the current newsgroup. Like the - command, you always return to the original article after reading the selected article. s [file] Save the current article, appending it to the specified file (default $HOME/articles). h Print the current header (slightly more verbose than normal header). H Print the current header in full (very verbose). N [newsgroup] Go to the next newsgroup, or to the specified newsgroup. (A specified newsgroup must be in the -n list, if any, or subscribed to.) U Unsubscribe from this newsgroup, and go to the next newsgroup. !command Shell escape. Command is executed. If command is ! the last escape command is executed. q or EOT Quit. The .newsrc file will be updated provided the flag -i was not specified. x Exit. .newsrc is left unchanged (as if no articles had been read). Some commands are available to send/reply or post news articles: r Reply to sender of the current article by mail. Readnews sets up the appropriate headers, and then calls mail(1) (or $MAILER, if there is such an environment variable) to send a reply to the sender. If there is no mailvia line in the control file, the address is taken from the From header of the article, and is in Internet form. If the value in the mailvia line is <path>, the address is taken from the Path header and is in UUCPnet form. If the value of mailvia is something else, the From address is transformed to UUCPnet syntax (site.x.y!user rather than email@example.com), and the mailvia value is prepended to it, with an intervening !. f Post a followup to the current article. Readnews sets up the appropriate headers, and then calls postnews(1CN) to post the followup article. p Post an article on a new topic. postnews(1CN) is called to post the new article, in the current newsgroup by default. In order to permanently resubscribe to a newsgroup denied by U, it is necessary to understand the format of the .newsrc file. The .newsrc file consists of two types of lines: option lines These start with the word options and contain the same arguments as the readnews command on the command line. read newsgroup lines These have the format <newsgroup>: <number>, where <number> represents the last item number seen in that particular newsgroup. If the newsgroup has been unsubscribed, the : is replaced by a !. To resubscribe the ! must be changed back to a :.
To invoke readnews for read only access to specified newsgroups, with the user unable to do anything but read those groups, a shell file might do:
readnews -d rfps!U -n newsgroups
which disables responses (r, f, and p), saving of copies (s), shell escapes (!), and unsubscribing (U).
$HOME/.newsrc options and list of previously read articles /var/lib/news/active current newsgroups /var/lib/news/readnews.ctl control file /var/lib/news/readnews.help help file /usr/local/libexec/cnews/inject/postnewsfor postings
Originally written by Michael Rourke, University of N.S.W (decvax!mulga!michaelr:elecvax). Modified and simplified for the C News project.
The mustsub control line really ought to be able to specify a subscription, i.e. multiple groups.
Control characters other than tab and backspace are turned into # when displaying article bodies. This heads off letter bombs at the price of interfering with use of non-ASCII character sets.
Cleanup of command-line syntax has eliminated the old -s option in favor of -L, -A, and -D. This is a change for the better, but an incompatible one.
The -A and -D options have a nasty tendency to dump core; they should be fixed or deleted.
This program is about as simple as they come. Almost any seasoned news user will want something more complex.
|-->||READNEWS (1CN)||16 April 1995|