snfetch,v0.3.8(8) | System Manager's Manual | snfetch,v0.3.8(8) |
snfetch - fetch articles.
snfetch [-r] [-t timeout] [-c depth] group [serial [max]]
snfetch expects to read NNTP from file descriptor 6, and write NNTP to file descriptor 7, which descriptors must have already been open. Articles retrieved are written to descriptor 1. Each article displayed is separated from the next by a dot on a line by itself. These articles are NNTP safe, in the sense that double-dot unquoting is not done, and all lines end in CR-LF. snfetch expects to begin it's NNTP speech by giving the GROUP command. The upstream server's greeting must have already been read some other way. Likewise, when snfetch is done, it will not send a QUIT command.
The output is suitable for feeding to snstore.
snfetch always checks the article ID of the prospective article before retrieving it. If the ID already exists in the ID database, the article will not be retrieved. Note that this does not guarantee that all articles retrieved will be unique.
snfetch does not guarantee to leave the NNTP conversation in a decent state (there might be more data to read, but snfetch aborted part way).
You will need to be root or own /var/spool/sn in order to run this program.
It is not safe to direct the output of several snfetches to the same pipe descriptor, but a file descriptor is all right.
snfetch takes the name of a single newsgroup on its command line. If serial is given, this is taken to be the first article number on group on the server to fetch. If max is specified, this is taken to be the maximum number of articles to fetch. The first article retrieved may be after serial if max would be violated. If max is not specified, there is no limit.
snfetch exits 1 on usage error, 2 on system failure, 3 on protocol error, 4 on read timeout, and 0 on success.
snstore (8), snget (8)
Harold Tay | N.B. |