amuser@cutmcvax.cs.curtin.edu.au (Bill Sharp-Smith AUG) (04/25/91)
To save time trying to find files in AB20, could some UNIX programmer come up with a shell script that takes the FILES file and processes it. I would like a script that strips out all files uploaded before 1/1/91. However, more complex ones could produce lists of all files containing the letters xyz in their filename, sort them in directory order, remove all non-Amiga files etc. etc.... Who can come up with the best one ? Thanks... Amiga Users Group of Western Australia
waw5805@isc.rit.edu (W.A. Willis ) (04/25/91)
In article <amuser.672554857@cutmcvax> amuser@cutmcvax.cs.curtin.edu.au (Bill Sharp-Smith AUG) writes: >To save time trying to find files in AB20, could some UNIX programmer >come up with a shell script that takes the FILES file and processes it. >I would like a script that strips out all files uploaded before 1/1/91. > >However, more complex ones could produce lists of all files containing >the letters xyz in their filename, sort them in directory order, remove >all non-Amiga files etc. etc.... Who can come up with the best one ? > >Thanks... >Amiga Users Group of Western Australia I know that this isn't what you're looking for but I have the following alias set up that does the pattern maching... alias sab20 "zcat ~/.FILES | fgrep -i" I can do a "sab20 filename" to search for filename in .FILES.Z
dave@cs.arizona.edu (Dave Schaumann) (04/26/91)
In article <amuser.672554857@cutmcvax> amuser@cutmcvax.cs.curtin.edu.au (Bill Sharp-Smith AUG) writes: >To save time trying to find files in AB20, could some UNIX programmer >come up with a shell script that takes the FILES file and processes it. >I would like a script that strips out all files uploaded before 1/1/91. > >However, more complex ones could produce lists of all files containing >the letters xyz in their filename, sort them in directory order, remove >all non-Amiga files etc. etc.... Who can come up with the best one ? Why not learn to use awk and/or sed? Then you could write your own scripts to massage FILES.Z any old way your heart desires. The first time I looked at FILES.Z, I thought "Boy, this sure is a big file, lots of stuff I don't care about, and I'm not too keen on the order the file names are listed". So I whipped up a quick script to strip off unwanted data, sort by file name, and compress some names. Here is my script (in the file names "fix"): awk -f f.awk $1 | sed -f f.sed | sort +2 Which means run the awk code in "f.awk" on the file named in the first command line parameter, pipe it to sed, which runs the sed commands in "f.sed" on the input, which then pipes it to sort, which sorts it according to the 2nd column (starting with 0), which at this point, is file names. f.awk contains: { printf "%s %7d %s\n", $2, $4, $5; } This simply strips out columns 1, 3, and 6-???, which (if I remember right) contain file permissions and file owner. Who cares about that stuff? and f.sed contains s/comp.sources.amiga/c.src.a/ s/comp.sources.misc/c.src.m/ s/comp.sources.unix/c.src.u/ s/comp.binaries.amiga/c.bin.a/ This just shortens a few oft-repeated strings. So all I have to do is uncompress FILES.Z, and then type "fix FILES >xff" (xff stands for Xanth Fixed Files). I then generally use lharc to archive it, and uncompress it whenever I want to search for something. This works well, since I've gotten as good as 5:1 compression ratio on this file: PACKED SIZE RATIO CRC STAMP NAME ------- ------- ------ ---- ----------------- ------------- 58166 285131 20.3% 7831 Apr 21 18:38 1991 xff ------- ------- ------ ---- ----------------- ------------- 58166 285131 20.3% Apr 21 18:41 1991 1 file Disclaimer: This code works for me. It's possible that the sed stuff could be combine into the awk commands, but I haven't had the time to learn much more awk than what you see above. -- Dave Schaumann | We're so sorry, Uncle Albert. But the kettle's dave@cs.arizona.edu | on the boil, and we're so *easly* called away...
crazyrat@disk.uucp (@jap) (04/27/91)
In article <1453@caslon.cs.arizona.edu>, dave@cs.arizona.edu (Dave Schaumann) writes: > In article <amuser.672554857@cutmcvax> amuser@cutmcvax.cs.curtin.edu.au (Bill Sharp-Smith AUG) writes: > >To save time trying to find files in AB20, could some UNIX programmer > >come up with a shell script that takes the FILES file and processes it. > >I would like a script that strips out all files uploaded before 1/1/91. > > > >However, more complex ones could produce lists of all files containing > >the letters xyz in their filename, sort them in directory order, remove > >all non-Amiga files etc. etc.... Who can come up with the best one ? > > > Why not learn to use awk and/or sed? Then you could write your own scripts > to massage FILES.Z any old way your heart desires. The first time I looked > at FILES.Z, I thought "Boy, this sure is a big file, lots of stuff I don't > care about, and I'm not too keen on the order the file names are listed". > So I whipped up a quick script to strip off unwanted data, sort by file name, > and compress some names. > This is nice and all, but is completely useless for those of us who HAVE to resort to BITFTP. I know of many people personally who have had to pull the FILES file down at least once a month to check it out. I thought that's what the file was for was to let people who have normal ftp be able to search the file for what they want. For us BITFTP people, though, there needs to be another way. I suggested (nicely) that the moderator of the site make a FILES.Z file for each subdivision of the archive. [/incoming/amiga, /incoming/vms, /amiga, etc]. I was politely ignored it seems. @Jap -- Joel C. Justen Crazyrat Productions Ltd. CRAZYRAT@DISK.UUCP JCJUST01@ulkyvx.BITNET
GaryWeir@cup.portal.com (Gary M Weir) (04/27/91)
RE: BITFTP of ab20, etc. Speaking as a "BITFTPer", IMHO we should be grateful for what we have. It takes a lot of work to keep up an archive like ab20 (and all the others out there, don't want to forget you). Yes, maybe there are features that we would _like_ to have and yes indeed, BITFTP is a pain but it is provided to us out of the generousity of others and I for one am very grateful. While suggestions are okay, IMHO we shouldn't air "complaints" on the net but request improvements direct to the moderator. I can hear it now though, "But I did and he totally ignored me!". Maybe the moderator could send you the contents of his daily e-mail and you could see what it is to handle it. Bottom line: When using something provided out of the generousity of others, show gratitude publicly and loudly. Send complaints or suggestions quietly, politely, and privately. Else you won't have anyone willing to provide the services to you. GaryWeir@cup.portal.com
oldfox@rieska.oulu.fi (Panu Hassi) (04/28/91)
Here's my 2 cents: I've written a program called dfilter that can extract files from directory contents. First you take dir contents to a file and then type for example: dfilter a Apr 01 1991 - May 04 1991 <Dir-contents This would show only the files that have arrived between Apr 1 and May 4. You can also cut unwanted columns like protection bits etc. The best thing, however, is that there is also a script file provided, that can show you only those files that have arrived after your last visit to this site. You can use this system for any number of FTP sites. Below is an example of this, I connect to a site which I haven't visited after April 10th: ftp> cd pub/amiga 250 CWD command successful. ftp> dir * aachen ## Take dir contents to a file 'aachen' ## ftp> !wnx aachen ## List the files that have arrived after my last visit, the 10th of April. Wnx takes the starting date from a file called .aachen.date . It scans the file aachen for new files and lists them. After this, the latest date is written to file .aachen.date. New files are written to file .aachen.new ## Current directory: - 1942 Apr 16 09:56 00README - 484922 Apr 16 07:58 c64music1_3.lzh comm: - 1901 Apr 16 09:19 00README - 365178 Apr 16 08:02 AmigaKIT27.lzh - 359889 Apr 16 08:05 AmigaNOS27.lzh - 245018 Apr 16 08:07 jrcomm1_02.lzh usenet: - 29832 Apr 13 13:05 cc.lzh - 57265 Apr 13 12:52 landscape1_0.lzh - 59165 Apr 13 13:03 quiz1_0.lzh - 5698 Apr 22 14:26 00README - 38042 Apr 22 13:25 townmaze1_1.lzh ------------------------------------------------------------------------- This program can be used in Unix and Amiga environments. The latest version 1.4 should be in ab20's incomin/amiga. Panu Hassi oldfox@rieska.oulu.fi
tadguy@abcfd01.larc.nasa.gov (Tad Guy) (05/04/91)
[ I waitied a little too long to follow up to this discussion and some of the articles have expired; sorry about that... ] In article <1991Apr27.021244.10261@disk.uucp> crazyrat@disk.uucp (@jap) writes: > This is nice and all, but is completely useless for those of us who HAVE to > resort to BITFTP. I know of many people personally who have had to pull the > FILES file down at least once a month to check it out. I thought that's what > the file was for was to let people who have normal ftp be able to search > the file for what they want. The FILES.Z is for anyone, not just those with ``normal'' ftp (whatever that is)... > I suggested (nicely) that the moderator of the site make a FILES.Z > file for each subdivision of the archive. [/incoming/amiga, > /incoming/vms, /amiga, etc]. > I was politely ignored it seems. More likely I never received your message. I can't find any record of having received or replied to any message from either of the addresses in your signature. Feel free to send it again (but please mail suggestions and comments about the AB20 ftp area to <ftp@ab20.larc.nasa.gov> and not to me personally). ...tad
tadguy@abcfd01.larc.nasa.gov (Tad Guy) (05/04/91)
In article <41758@cup.portal.com> GaryWeir@cup.portal.com (Gary M Weir) writes: > Yes, maybe there are features that we would _like_ to have and yes > indeed, BITFTP is a pain but it is provided to us out of the > generousity of others and I for one am very grateful. > > While suggestions are okay, IMHO we shouldn't air "complaints" on the > net but request improvements direct to the moderator. I can hear it now > though, "But I did and he totally ignored me!". Maybe the moderator could > send you the contents of his daily e-mail and you could see what it is > to handle it. My inbox is over 300 and growing rapidly, because I've been working on some projects that have kept me away from it for substantial periods of time; however, comments and suggestions mailed to <ftp@ab20.larc.nasa.gov> are always considered, even the really bad ones. And nearly all mail to that address gets responded to either by Jon or myself. There's still some comments about the README files in my inbox that bear more study, for example. Thanks for the understanding... ...tad