Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!uunet!news.uu.net!sparky!kent From: dank@blacks.jpl.nasa.gov (Dan Kegel) Newsgroups: comp.sources.misc Subject: v20i007: log_archie - Script for easy access to Archie, Patch01 Message-ID: <1991May22.040301.16686@sparky.IMD.Sterling.COM> Date: 22 May 91 04:03:01 GMT Sender: kent@sparky.IMD.Sterling.COM (Kent Landfield) Organization: Sterling Software, IMD Lines: 36 Approved: kent@sparky.imd.sterling.com X-Md4-Signature: 26029786cec321c65a36c648bfc53419 Submitted-by: Dan Kegel Posting-number: Volume 20, Issue 7 Archive-name: log_archie/patch01 Patch-To: log_archie: Volume 19, Issue 63 The awk script supplied in log_archie neglects to print the year part of each file's timestamp. A patch to postarchie.awk follows. Dan ----- *** old.postarchie Tue May 21 22:48:28 1991 --- postarchie.awk Tue May 21 22:51:27 1991 *************** *** 3,10 **** # Output format is # hostname directory filename size date # padded with many tabs. ! # You WILL run into a bug in SunOS<=4.1.1b's sort utility if you run this stuff ! # through 'sort +2'; sort fails to ignore whitespace properly. /^Host / {host=$2 substr("\t\t\t\t\t\t", 1, (47-length($2))/8); next} /^ *Location:/ {dir=$2 substr("\t\t\t\t\t\t\t\t", 1, (63-length($2))/8); next} ! /^ *FILE/ { print host dir $7 substr("\t\t\t\t", 1, (31-length($7))/8) $3 " " $4 " " $5; next} --- 3,9 ---- # Output format is # hostname directory filename size date # padded with many tabs. ! # Note: On SunOS, sort +2 fails on this scripts' output; use sort -b +2 instead. /^Host / {host=$2 substr("\t\t\t\t\t\t", 1, (47-length($2))/8); next} /^ *Location:/ {dir=$2 substr("\t\t\t\t\t\t\t\t", 1, (63-length($2))/8); next} ! /^ *FILE/ { print host dir $7 substr("\t\t\t\t", 1, (31-length($7))/8) $3 " " $4 " " $5 " " $6; next} exit 0 # Just in case... -- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM Sterling Software, IMD UUCP: uunet!sparky!kent Phone: (402) 291-8300 FAX: (402) 291-4362 Please send comp.sources.misc-related mail to kent@uunet.uu.net.