Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!news.funet.fi!jyu.fi!jyu.fi!otto From: otto@tukki.jyu.fi (Otto J. Makela) Newsgroups: comp.windows.ms Subject: Re: The Latest Updates To cica.cica.indiana.edu Message-ID: Date: 2 May 91 16:00:24 GMT References: <32486@usc> <1991May1.213326.24322@bronze.ucs.indiana.edu> Sender: news@jyu.fi (News articles) Organization: Turing Police, Criminal AI section Lines: 63 In-Reply-To: regoli@bronze.ucs.indiana.edu's message of 1 May 91 21: 33:26 GMT Nntp-Posting-Host: jyu.fi Well, since everyone is posting their ideas on how to slice and dice the INDEX file, I'll take a hack at it also. Here it is, csh+awk which probably could be done with perl a lot easier etc. but I'm not good enough on it yet... Takes optionally one argument, which is a flag like '-50' to indicate how many files to get into the listing. It assumes INDEX from cica is in the current directory (if it isn't, it'll get it there from cica). Generates a file like INDEX-20, which contains the last 20 indexed uploads to cica starting from the latest. The output is a bit ragged, since it doesn't retab the output (which could be bit of a chore in a 1-hour hack), and it recognizes file names from the input file simply by looking for a letter or number as the 1st character on the line. -- bmp/warp12.zip 910430 Enterprise Spaceship (640x480x256) bmp/fish.zip 910430 640x480x16 Snapshot of Fish bmp/blank.zip 910430 1024x768x1 Black Bitmap (Why?!) util/disktool.zip 910429 Compliments FileManager (one click to move/delete/copy) util/winsaver.zip 910425 Restore Windows Session as You Left It misc/rtf-desc.zip 910425 RichTextFormat Discussion misc/cardfile.zip 910425 Discussion of Cardfile format fonts/bedrock.zip 910425 Bedrock Font util/wnb30a.zip 910424 Windows Batch Language Version 3.0a util/typemate.zip 910424 Set Typematic Speed util/qvtnet16.zip 910423 WinQVT for Ethernet Connections (4-11-91 version) fonts/gdips_96.zip 910423 96 DPI (VGA resolution) 1:1 Aspect Ratio Screen Fonts fonts/gdips120.zip 910423 120 DPI (8514 resolution) 1:1 Aspect Ratio Screen Fonts util/snagit16.zip 910421 SnagIt Ver 1.6 Screen Capture/Print Utility util/cp-70s.zip 910421 Command Post 7.0s and Browser 3.8 for Windows misc/winvn.zip 910421 Windows-based Usenet News Reader (like VN) demo/cura21.zip 910420 Simu of Sterile Insect Release Method of Pest Control util/wined10g.zip 910418 WinEdit 1.0G: Programmer's Editor for Windows util/tft.zip 910418 Text File Searcher misc/frequently.ask 910418 Freq Asked Questions About Win3 (from comp.windows.ms) -- #!/bin/csh -f # 02/05/91 otto@jyu.fi # Default for how many files to get. if ( $#argv == 0 ) set argv=(-20) # If necessary, go to cica and get master list of win3 files. if ( ! -f INDEX ) then ftp -n cica.cica.indiana.edu << finis user anonymous $USER@$HOST cd /pub/pc/win3 get INDEX finis endif # Go thru INDEX, grabbing directory names as we go. Print out each filename/w # directory name. Pipe result through sort and head to get proper subindex. awk -f - INDEX << finis | sort -nr +1 -2 | head $1 > INDEX$1 \$1=="**" && \$8 ~ /^~ftp\/pub\/pc\/win3\// { dir=substr(\$8,18) } \$1 ~ /^[a-z0-9]/ { print dir "/" \$0 } finis exit 0 -- /* * * Otto J. Makela * * * * * * * * * * * * * * * * * * */ /* Phone: +358 41 613 847, BBS: +358 41 211 562 (USR HST/V.32, 24h/d) */ /* Mail: Kauppakatu 1 B 18, SF-40100 Jyvaskyla, Finland, EUROPE */ /* * * Computers Rule 01001111 01001011 * * * * * * * * * * * * * * * * */