home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1995 October / Simtel-MSDOS-Oct1995-CD1.iso / disc1 / filedocs / simcvt3.awk < prev    next >
Text File  |  1994-01-01  |  1KB  |  38 lines

  1. #!/usr/bin/awk -f
  2.  
  3. # simcvt3.awk is an Awk script which converts a SimTel MSDOS simibm.idx
  4. # index file to a simibm.lst list file.  It is freely distributable.
  5.  
  6. # Usage:  awk -f simcvt3.awk simibm.idx > simibm.lst
  7. # Author: Daniel S. Lewart (d-lewart@uiuc.edu) 1 Jan 1995
  8.  
  9. BEGIN {
  10.     FS = "\""
  11. print "These files are available by anonymous FTP from the SimTel primary"
  12. print "mirror site OAK.Oakland.Edu (141.210.10.117) and its mirrors.  See"
  13. print "/SimTel/msdos/filedocs/download.inf for a list of all mirror sites."
  14.     print ""
  15.     print "NOTE: Type B is Binary; Type A is ASCII"
  16.     print ""
  17. }
  18.  
  19. {
  20.     dir2 = $2$4
  21.     if ( dir1 != dir2 ) {
  22.         if ( dir1 != "" ) print ""
  23.         print "Directory", dir2
  24.         print " Filename   Type Length   Date    Description"
  25.         print "=============================================="
  26.         dir1 = dir2
  27.     }
  28.     Name = $6
  29.     split($7,a,",")
  30.     Type = "?"
  31.     if (a[4] == 7) Type = "A"
  32.     if (a[4] == 8) Type = "B"
  33.     Size = a[3]
  34.     Date = a[5]
  35.     Description = $8
  36.     printf("%-12s  %s %7d  %6d  %s\n",Name,Type,Size,Date,Description)
  37. }
  38.