v20i007: log_archie - Script for easy access to Archie, Patch01
Dan Kegel
dank at blacks.jpl.nasa.gov
Wed May 22 14:03:01 AEST 1991
Submitted-by: Dan Kegel <dank at blacks.jpl.nasa.gov>
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 at 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 at uunet.uu.net.
More information about the Comp.sources.misc
mailing list