Thread View: news.software.nn
8 messages
8 total messages
Started by Lanny Finch
Mon, 01 Aug 1994 23:40
Multi .newsrc's ?
Author: Lanny Finch
Date: Mon, 01 Aug 1994 23:40
Date: Mon, 01 Aug 1994 23:40
13 lines
1314 bytes
1314 bytes
I'm a newbee on the net and have managed to get a decent grip on many of nn's features, but despite a lot of rolling around it its many help files, I can't seem to find the answer to a question. Is it possible to designate files other than .newsrc from which to retrieve unread, subcribed-to postings? I'm thinking in terms of having a ".newsrc" taylored for me and another taylored for my wife and keep the big all-inclusive one just for laughs. I've tried running a little script that moves my personal file to .newsrc before the 'nn' call, but this method has resulted in at least one disaster (lost "main" .newsrc due to a system lockup).
Re: Multi .newsrc's ?
Author: Trip Martin
Date: Tue, 02 Aug 1994 00:25
Date: Tue, 02 Aug 1994 00:25
27 lines
2055 bytes
2055 bytes
lanny@crl.com (Lanny Finch) writes: >I'm a newbee on the net and have managed to get a decent grip on many of >nn's features, but despite a lot of rolling around it its many help >files, I can't seem to find the answer to a question. >Is it possible to designate files other than .newsrc from which to >retrieve unread, subcribed-to postings? >I'm thinking in terms of having a ".newsrc" taylored for me and another >taylored for my wife and keep the big all-inclusive one just for laughs. >I've tried running a little script that moves my personal file to .newsrc >before the 'nn' call, but this method has resulted in at least one >disaster (lost "main" .newsrc due to a system lockup). I do something along those lines but a bit different. I have a directory $HOME/.news which has one directory for each NNTP server I want to access (i.e. $HOME/.news/rpi). Each directory holds all the files that the .nn directory normally holds, and the .newsrc as well (I specify this in the init file for each directory). I then have a script which symlinks .nn to the appropriate directory, and removes the symlink after nn is done. Works quite well. -- Trip Martin night@acm.rpi.edu
Re: Multi .newsrc's ?
Author: C Lewis
Date: Tue, 02 Aug 1994 02:15
Date: Tue, 02 Aug 1994 02:15
56 lines
2894 bytes
2894 bytes
lanny@crl.com (Lanny Finch) writes:
>I'm a newbee on the net and have managed to get a decent grip on many of
>nn's features, but despite a lot of rolling around it its many help
>files, I can't seem to find the answer to a question.
>Is it possible to designate files other than .newsrc from which to
>retrieve unread, subcribed-to postings?
>I'm thinking in terms of having a ".newsrc" taylored for me and another
>taylored for my wife and keep the big all-inclusive one just for laughs.
>I've tried running a little script that moves my personal file to .newsrc
>before the 'nn' call, but this method has resulted in at least one
>disaster (lost "main" .newsrc due to a system lockup).
You're on the right track. I keep two .newsrc files, one's work
related, the other is a little more frivalous.
I use two scripts to *copy* the appropriate .newsrc to the correct name.
You also need to move the select files. The only problems occur
with new groups first coming up when your reading the wrong .newsrc,
easily fixed with vi :-)
Below is an example script, just call it nn2 and create the appropriate
files on a once off basis (.nn/select.nn2 .newsrc2)
It copies the files you need into place and after reading copies the
altered ones back.
If the system crashes you only lose that session.
Duplicate for as many 'segments' as you need.
-----------------8<-------------->8--------------------
#!/bin/sh
#
# Example shell script to allow the use of multiple .newsrc's
# with nn6.4.18 (Should work with 6.5.* as far as I know)
# Author (:-) carl@probitas.cs.utas.edu.au
# *Use at own risk, no responsibility taken , etc, etc *
#
fred=`pwd`
cd
cp .newsrc2 .newsrc
cp .nn/select.nn2 .nn/select
/usr/new/bin/nn $*
cp .nn/select .nn/select.nn2
cp .newsrc .newsrc2
cd $fred
--
-------------------------------------------------------------------
| |
Carl Lewis | |
| carl@probitas.cs.utas.edu.au |
Re: Multi .newsrc's ?
Author: Nautronix Australia
Date: Tue, 02 Aug 1994 11:14
Date: Tue, 02 Aug 1994 11:14
35 lines
2070 bytes
2070 bytes
carl@probitas.cs.utas.edu.au (C Lewis) writes: >lanny@crl.com (Lanny Finch) writes: >>Is it possible to designate files other than .newsrc from which to >>retrieve unread, subcribed-to postings? >>I'm thinking in terms of having a ".newsrc" taylored for me and another >>taylored for my wife and keep the big all-inclusive one just for laughs. >>I've tried running a little script that moves my personal file to .newsrc >>before the 'nn' call, but this method has resulted in at least one >>disaster (lost "main" .newsrc due to a system lockup). I just set $HOME to a subdirectory and run 'nn' again, it thinks it's not been run before and installs itself properly. eg: mkdir fun mkdir work setenv HOME <usual HOME>/fun <- to use .newsrc in .../fun cd nn setenv HOME <usual HOME>/work <- to use .newrc in .../work cd nn setenv HOME <usual HOME> <- to reset everything to normal HTH, Richard. (rip@nixltd.com.au) -- ---------------------------------------------------------------------- Greg Colley greg@cs.curtin.edu.au Programmer/Administrator Ph: (+61 | 0) 9 335 4800
Re: Multi .newsrc's ?
Author: Lanny Finch
Date: Tue, 02 Aug 1994 16:16
Date: Tue, 02 Aug 1994 16:16
1 lines
791 bytes
791 bytes
Thanks, Carl. That'll work (he says as he slaps his balding forehead).
Re: Multi .newsrc's ?
Author: Nancy McGough
Date: Tue, 02 Aug 1994 18:45
Date: Tue, 02 Aug 1994 18:45
35 lines
1571 bytes
1571 bytes
lanny@crl.com <Lanny Finch> writes:
>Is it possible to designate files other than .newsrc from which to
>retrieve unread, subcribed-to postings?
>
>I'm thinking in terms of having a ".newsrc" taylored for me and another
>taylored for my wife and keep the big all-inclusive one just for laughs.
How about having a separate init file for you and your wife,
say init.lanny and init.mary and then each of you can start
nn with:
nn -Iinit.lanny
OR...
nn -Iinit.mary
Then in each of your init files you can specify things like:
newsrc
news-header
news-record
mail-header
mail-record
folder
sequence
And any other things that you want to customize. See the nn
man pages for more info on these variables.
Hope this helps,
Nancy
--
<A HREF="ftp://ftp.ii.com/pub/ii">Nancy McGough, Infinite Ink</A>
Re: Multi .newsrc's ?
Author: Joseph Boyle
Date: Mon, 08 Aug 1994 07:44
Date: Mon, 08 Aug 1994 07:44
13 lines
1216 bytes
1216 bytes
nixltd@yarrow.wt.uwa.edu.au (Nautronix Australia) writes: >I just set $HOME to a subdirectory and run 'nn' again, it thinks it's not >been run before and installs itself properly. Thanks! I took your advice and this remarkably short script does the job. #!/bin/csh setenv HOME ~boyle/.khris #my guest's .newsrc is in here nn $1 $2 Since the script's subshell has its own environment, HOME stays unchanged in my original environment, so no worries about not setting it back.
Re: Multi .newsrc's ?
Author: Milt Epstein
Date: Fri, 12 Aug 1994 19:16
Date: Fri, 12 Aug 1994 19:16
35 lines
2370 bytes
2370 bytes
boyle@netcom.com (Joseph Boyle) writes: >nixltd@yarrow.wt.uwa.edu.au (Nautronix Australia) writes: > >>I just set $HOME to a subdirectory and run 'nn' again, it thinks it's not >>been run before and installs itself properly. > >Thanks! I took your advice and this remarkably short script does the job. > >#!/bin/csh >setenv HOME ~boyle/.khris #my guest's .newsrc is in here >nn $1 $2 > >Since the script's subshell has its own environment, HOME stays unchanged >in my original environment, so no worries about not setting it back. I'm no wizard, but changing $HOME seems to me like a dangerous thing to do, one of those things that can bite you in the ass, so to speak, unexpectedly. I suspect that lots of programs use it. I didn't see what the original question was, but if it relates to having two people using nn from the same account (or two .newsrc files for whatever reason), I suspect there are safer ways of doing it. For example, have two .nn directories (say .nn1 and .nn2), each with their own .newsrc, set nn's newsrc variable to look for the .newsrc file in the .nn directory, then a script (or two) that moves the appropriate .nn directory to .nn and calls nn. I think something like this has been proposed in the past in this group when similar questions have been asked (and I don't know whether it was mentioned this time). -- Milt Epstein Department of Computer Science University of Illinois epstein@cs.uiuc.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