home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / UNIX / ARCHIE / CLIENTS / LOG_ARCH / POSTARCH.AWK < prev   
Encoding:
AWK Script  |  1991-08-18  |  513 b   |  10 lines

  1. #!/bin/awk -f
  2. # Awk script to produce a single-line-per-file output format for archie.
  3. # Output format is
  4. #  hostname    directory    filename    size    date
  5. # padded with many tabs.
  6. # Note: On SunOS, sort +2 fails on this scripts' output; use sort -b +2 instead.
  7. /^Host / {host=$2 substr("\t\t\t\t\t\t", 1, (47-length($2))/8); next}
  8. /^ *Location:/ {dir=$2 substr("\t\t\t\t\t\t\t\t", 1, (63-length($2))/8); next}
  9. /^ *FILE/ { print host dir $7 substr("\t\t\t\t", 1, (31-length($7))/8) $3 " " $4 " " $5 " " $6; next}
  10.