jamison@hobbes.Corp.Sun.COM (& Gray) (05/03/91)
> burhans@mizar.usc.edu (Mustang Sally) writes: > I'd like to take this opportunity to publically thank Michael for > the "foodness of his heart"... Me too - I've only recently discovered the wonderful wealth of stuff available on Cica. Rather than burden the archiver with additional daily work, try the Unix csh script below to extract from the INDEX any listings that may have appeared since the last time you looked. Supply it with the date of the last time you had grabbed the INDEX, in YYMMDD form, and it will print out any lines dated on that day or later, as well as the headers specifying subdirectories, so you know where to look. Note that this script requires csh and awk. I'll entertain requests to port it to use sh instead of csh, but doing it without awk is left as an exercise for the interested reader. :-) I'll try to update it if I find that the index file format changes enough to break it. Save it in a file named "since", or whatever you like, either in the directory where you keep your index files or somewhere in your path. Make it executable with "chmod a+x since". An optional second argument specifies the name of the index file, which otherwise defaults to INDEX. Here is an example, using an INDEX that I grabbed on April 30th and renamed to INDEX.apr30. This example lists files added since April 25th: hobbes% since 910425 INDEX.apr30 ** Index of Windows BitMap Files in ~ftp/pub/pc/win3/bmp blank.zip 910430 1024x768x1 Black Bitmap (Why?!) fish.zip 910430 640x480x16 Snapshot of Fish warp12.zip 910430 Enterprise Spaceship (640x480x256) ** Index of Windows BitMap Utility Files in ~ftp/pub/pc/win3/bmp/util ** Index of Windows Demo Files in ~ftp/pub/pc/win3/demo ** Index of Printer Drivers for Windows in ~ftp/pub/pc/win3/drivers/printer ** Index of Video Files, Drivers for Windows in ~ftp/pub/pc/win3/drivers/video bedrock.zip 910425 Bedrock Font ** Index of Windows Games in ~ftp/pub/pc/win3/games ** Index of Windows Icon Files in ~ftp/pub/pc/win3/icons ** Index of Miscellaneous Windows Files in ~ftp/pub/pc/win3/misc cardfile.zip 910425 Discussion of Cardfile format rtf-desc.zip 910425 RichTextFormat Discussion ** Index of MicroSoft Software Development Libraries (SDL) disktool.zip 910429 Compliments FileManager (one click to move/delete/copy) winsaver.zip 910425 Restore Windows Session as You Left It ** Index of Windows Sounds in ~ftp/pub/pc/win3/util/sounds Enjoy! -- Jamie Gray ------------------ cut here ------------------------- #!/bin/csh # since.csh: print out Cica index entries since a certain date, # including the subdirectory header lines as well. # required first arg: date in YYMMDD form # optional second arg: name of index file (defaults to INDEX) if ($#argv < 1) then echo please supply date in YYMMDD form exit endif if ($#argv == 2) then set indexfile=$2 else set indexfile=INDEX endif # print lines of form "** Index", and lines containing # six-digit numbers if the second field is greater than # the supplied date awk '/\*\* Index/ {print; next} \ /[89][0-9][0-9][0-9][0-9][0-9]/ {if ($2 >= '$argv[1]') print; next } ' \ $indexfile ---------------------- cut here --------------------- -- Jamison Gray, jamison@Eng.Sun.COM "Football is a mistake. It combines Sun Microsystems, M.S. 21-04 the two worst elements of American Life: Mountain View, CA 94043 violence and committee meetings" -George Will