Thread View: uw.unix
6 messages
6 total messages
Started by Clint Wong
Mon, 11 Sep 1989 18:09
Catching up on News
Author: Clint Wong
Date: Mon, 11 Sep 1989 18:09
Date: Mon, 11 Sep 1989 18:09
5 lines
615 bytes
615 bytes
Is there a quick way in rn to mark all unread articles as being read?
--
UUCP : {uunet,utai,clyde}!watmath!cgwong
INTERNET : cgwong@watmath.waterloo.edu < Clint Wong >
BITNET : cgwong@water.BITNET < University of Waterloo >
Re: Catching up on News
Author: Dermot G. Harriss
Date: Mon, 11 Sep 1989 21:31
Date: Mon, 11 Sep 1989 21:31
13 lines
946 bytes
946 bytes
In article <16326@watdragon.waterloo.edu> cgwong@watdragon.waterloo.edu (Clint Wong) writes: >Is there a quick way in rn to mark all unread articles as being read? Sure. Your subject line suggests a likely possibility. The command is "c" which stands for "catch up". You can use it either at the news group selection level or the article selection level. It's in the manual. c Catch up--mark all unread articles in this newsgroup as read. Cheers.
Re: Catching up on News
Author: Clint Wong
Date: Tue, 12 Sep 1989 15:41
Date: Tue, 12 Sep 1989 15:41
24 lines
1490 bytes
1490 bytes
In article <29052@watmath.waterloo.edu>, dgharriss@watmsg.waterloo.edu (Dermot G. Harriss) writes:
> In article <16326@watdragon.waterloo.edu> cgwong@watdragon.waterloo.edu (Clint Wong) writes:
> >Is there a quick way in rn to mark all unread articles as being read?
>
> Sure. Your subject line suggests a likely possibility.
> The command is "c" which stands for "catch up".
> You can use it either at the news group selection level or the
> article selection level.
> It's in the manual.
>
> c Catch up--mark all unread articles in this newsgroup as
> read.
>
> Cheers.
This is not quite what I was looking for. I want to catch-up on ALL of
my currently subscribed newsgroups all at once. This is useful when trying
to move your .newsrc to another machine and all the article numbers are
different or when you come back from a long vacation and there are a zillion
Unread articles in a hundred groups.
--
UUCP : {uunet,utai,clyde}!watmath!cgwong
INTERNET : cgwong@watmath.waterloo.edu < Clint Wong >
BITNET : cgwong@water.BITNET < University of Waterloo >
Re: Catching up on News (toolsmith's solution)
Author: Dermot G. Harriss
Date: Tue, 12 Sep 1989 19:32
Date: Tue, 12 Sep 1989 19:32
64 lines
2860 bytes
2860 bytes
In article <16340@watdragon.waterloo.edu> cgwong@watdragon.waterloo.edu (Clint Wong) writes:
>> >Is there a quick way in rn to mark all unread articles as being read?
>>
>This is not quite what I was looking for. I want to catch-up on ALL of
>my currently subscribed newsgroups all at once. This is useful when trying
>to move your .newsrc to another machine and all the article numbers are
>different or when you come back from a long vacation and there are a zillion
>Unread articles in a hundred groups.
In rn? As a guess, no. "c" when the current group is $ at the newsgroup
selection level doesn't have the intuitive effect of catching up all
groups. You'd have to write a macro or something. Steve? ;-)
But you can achieve the same effect by munging your .newsrc to set the
last read article numbers to the server's last received article numbers
as recorder in the news active file. Here's an awk (actually new awk)
tool I just whipped up to do this:
BEGIN {
FS = "[ \t]+"
}
{
entry = $1
group = substr (entry, 1, length (entry)-1)
while (getline < "active" > 0) {
if ($1 == group) {
printf ("%s 1-%d\n", entry, $2)
break
}
}
close "active"
}
1. put the above script in the directory where your .newsrc is
(let's call it "doit").
2. use getactive(8) to get your server's active file: type
getactive active
in the same directory where .newsrc and doit are.
3. save your old .newsrc:
mv .newsrc .newsrc~
3. type the following:
nawk -f doit < .newsrc~ > .newsrc
This will take a while if your .newsrc contains many groups or your
machine is slow (or both). You can "tail -f .newsrc" if you like to
see how (or if) things are progressing.
The above script is very inefficient. The active file (which is huge)
is opened and read for every line of your .newsrc file. If your .newsrc
file happened to be alphabetically sorted by group name, then you could
eliminate the `close "active"' line, making it considerably faster.
It's a 3 minute hack - I don't claim it's beautiful or robust or anything.
UW.UNIX STEVE HAYMAN MEMORIAL AWK HACKERS CHALLANGE!!!
make it faster! make it beautiful!
hint: check out awk arrays...
enjoy.
-- Dermot
P.S.
As for moving your .newsrc to a machine served by a different news server,
see fix_newsrc(8).
Re: Catching up on News (toolsmith's solution)
Author: Brad Templeton
Date: Wed, 13 Sep 1989 00:19
Date: Wed, 13 Sep 1989 00:19
21 lines
1333 bytes
1333 bytes
Actually, you might want to check out our "mknewsrc" program. It's in my newsclip directory (~bstempleton/clip) on watmath. It will create a .newsrc for you that has every current article unread, but it has a "p=" option to specify a percentage. mknewsrc +n p=100 - outputs a .newsrc with the same groups as your .newsrc with 100% of articles unread mknewsrc +n p=0 - does what you want, with all article marked read mknewsrc +n p=10 - gives you the last 10% of articles in each group Skip the +n and it gives you all groups in the active file. Provide patterns and you will only get groups that match the regular expressions. output is to stdout. Wiht +n it's probably not safe to write to your .newsrc directly. -- Brad Templeton, Looking Glass Software Ltd. -- Waterloo, Ontario 519/884-7473
Re: Catching up on News
Author: Dan Christensen
Date: Wed, 13 Sep 1989 00:33
Date: Wed, 13 Sep 1989 00:33
13 lines
1055 bytes
1055 bytes
In article <16326@watdragon.waterloo.edu> cgwong@watdragon.waterloo.edu (Clint Wong) writes:
>Is there a quick way in rn to mark all unread articles as being read?
>--
>UUCP : {uunet,utai,clyde}!watmath!cgwong
>INTERNET : cgwong@watmath.waterloo.edu < Clint Wong >
>BITNET : cgwong@water.BITNET < University of Waterloo >
The "c" command does it. In rn, "h" gives you context sensitive help
and shows the "c" command.
----
Dan Christensen, Computer Graphics Lab, jdchrist@watcgl.uwaterloo.ca
University of Waterloo, Waterloo, Ont. jdchrist@watcgl.waterloo.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads