Article View: news.software.nntp
Article #7325Changes to INN FAQ Part part5/9: part5
From: Heiko W.Rupp
Date: Tue, 07 May 1996 00:00
Date: Tue, 07 May 1996 00:00
42 lines
1676 bytes
1676 bytes
--- part5 1996/03/12 12:26:44 2.8
+++ part5 1996/05/07 08:02:55
@@ -388,6 +388,32 @@
1. ctlinnd throttle 'updating active'
2. awk '{printf "%s %.10d %.10d %s\n", $1, $2, $3, $4}' active > active.new
+
+if your awk printf spaves instead of leading zeroes in this step,
+then try the following instead of step 2: (or do all awk's pad with
+spaces here?)
+
+perl /tmp/foo < active > active.new
+
+---------- /tmp/foo
+#!/usr/local/bin/perl
+
+while(<>) {
+ chop;
+ ($nam,$lo,$hi,$mode)=split;
+ $f=length($lo);
+ for ($i=0;$i<10-$f;$i++) {
+ $lo = "0".$lo;
+ }
+ $f=length($hi);
+ for ($i=0;$i<10-$f;$i++) {
+ $hi = "0".$hi;
+ }
+
+ printf("%s %s %s %s\n",$nam,$lo,$hi,$mode);
+}
+----------- (If someone has an easier way, then please tell me)
+
3. mv active.new active
4. ctlinnd reload active updated
5. ctlinnd go 'updating active'
--
Heiko W.Rupp hwr@pilhuhn.de
INN FAQ can be found in ftp://ftp.xlink.net/pub/news/docs/
Stoppt den Kinderwahnsinn !! -- Esst nur deutsche Kinder !!
Technical Details
Message-ID:
<diff.faq.p5_831485169@pilhuhn.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <diff.faq.p5_831485169@pilhuhn.de> Subject: Changes to INN FAQ Part part5/9: part5 Date: Tue, 07 May 1996 00:00:00 +0000 From: hwr@pilhuhn.de (Heiko W.Rupp) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 153514994 Supersedes: <diff.faq.p5_831057012@pilhuhn.de> Followup-to: news.software.nntp Organization: The Home Of The Pilhuhn Newsgroups: news.software.nntp,news.software.b