🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Charles Wilkins Sun, 13 Dec 1998 00:00
need a script for pruning a new ACTIVE file
#33773
Author: Charles Wilkins
Date: Sun, 13 Dec 1998 00:00
21 lines
1312 bytes
Hi,
I am using inn-1.7.2

I am also using /usr/lib/news/bin getlist -h hostname > active to pull down
a peer's active file.
I want to prune all of the entries of this file down to this format:
groupname 0000000000 0000000001 y

Here is a script that I found that doesnt work for me. It is supposed to
convert the contents of a file by the name of upstream.active into your
starting active file. On my system it just empties the contents of the
active file.

cat upstream.active | awk 'amp;#123; printf("%s 0000000000 0000000001
%s\n", $1 $4) amp;#125;' > active

Any comments or suggestions would be greatly appreciated!
Thanks to all who reply.
Charles Wilkins

Re: need a script for pruning a new ACTIVE file
#33795
Author: Mike O'Connor
Date: Mon, 14 Dec 1998 00:00
32 lines
1885 bytes
In article <01be26eb$905963e0$2b6e60cf@the-helm.pcscs.com>,
Charles Wilkins <chas@pcscs.com> wrote:
:Hi,
:I am using inn-1.7.2
:
:I am also using /usr/lib/news/bin getlist -h hostname > active to pull down
:a peer's active file.
:I want to prune all of the entries of this file down to this format:
:groupname 0000000000 0000000001 y
:
:Here is a script that I found that doesnt work for me. It is supposed to
:convert the contents of a file by the name of upstream.active into your
:starting active file. On my system it just empties the contents of the
:active file.
:
:cat upstream.active | awk 'amp;#123; printf("%s 0000000000 0000000001
:%s\n", $1 $4) amp;#125;' > active
:
:Any comments or suggestions would be greatly appreciated!

A starting active file shouldn't have all its groups unmoderated.
The awk script may take that into account -- seems like it'd be
easier to just "awk '{print $1 " 0000000000 0000000001 " $4}'".
But really you'll want to take a look at the actsync program, which 
has all kinds of knobs and features to do much of what you want.

--
 Michael J. O'Connor | WWW: http://dojo.mi.org/~mjo/ | Email: mjo@dojo.mi.org
 InterNIC WHOIS: MJO | (has my PGP & Geek Code info) | Phone: +1 248-848-4481


Re: need a script for pruning a new ACTIVE file
#33844
Author: Matthew Malthouse
Date: Wed, 16 Dec 1998 00:00
41 lines
2083 bytes
On 13 Dec 1998 23:58:10 GMT Charles Wilkins wrote:
} Hi,
} I am using inn-1.7.2
} 
} I am also using /usr/lib/news/bin getlist -h hostname > active to pull down
} a peer's active file.
} I want to prune all of the entries of this file down to this format:
} groupname 0000000000 0000000001 y
} 
} Here is a script that I found that doesnt work for me. It is supposed to
} convert the contents of a file by the name of upstream.active into your
} starting active file. On my system it just empties the contents of the
} active file.
} 
} cat upstream.active | awk 'amp;#123; printf("%s 0000000000 0000000001
} %s\n", $1 $4) amp;#125;' > active
} 
} Any comments or suggestions would be greatly appreciated!

The following Perl script (written by a colleague) does the job for me.

Take out the comment marks at the begining of each line of course. :)
#  #!/usr/bin/perl
#	open(ACTIVE, "active") ; 
#	while (<ACTIVE>) {
#	        ($name, $hi, $lo, $flag) = split ;
#	        open(NEWACTIVE, ">>miktest") ;
#	        print NEWACTIVE "$name 0000000000 0000000001 $flag\n" ;
#	        close(NEWACTIVE) ;
#	}

Hope it's what you want. The new file is called 'miktest' but you could 
change that or do as I do, copy active to active.bak and mikect to active

Matthew
-- 
And on the seventh day, He exited from append mode.
 
http://www.calmeilles.demon.co.uk 

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