🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Heiko W.Rupp Tue, 07 May 1996 00:00
Changes to INN FAQ Part part5/9: part5
#7325
Author: Heiko W.Rupp
Date: Tue, 07 May 1996 00:00
42 lines
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 !!

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