🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.shell
2 messages
2 total messages Started by Carl Edman Fri, 21 Dec 1990 06:20
A one-liner to find files in archive servers
#1985
Author: Carl Edman
Date: Fri, 21 Dec 1990 06:20
42 lines
2780 bytes
This is a little one-liner I wrote and decided to share with my fellow
unix-shell programmers in the spirit of Xmas. :-).

Archie is a service available via telnet which collects and
distributes the file listings of a large number of publicly accessible
ftp servers. This script is a frontend to it. Just type "archie
foobar" where foobar is any regular expression contained in the
program you search, wait a little while, and get the listing of all
anon ftp servers which contain versions of this file, sorted newest
versions first. Example output:

~> archie amoeba
Oct 23 1990   46343 /uafcseg.uark.edu:/amiga/new_uploads/amoeba.lzh
Oct 22 1990      44 /sachiko.acc.stolaf.edu:/home/sachiko/cdr/work/Installs/acc/NIC_files/DONE/aliases.amoeba
Oct 22 1990     760 /ucece1.ece.uc.edu:/pub/biblio/world/opsys/amoeba
Oct 12 1990     512 /quiche.cs.mcgill.ca:/pub/amoeba
Sep 12 1990     512 /stolaf.edu:/pub/amoeba
Aug 19 1990    1024 /watmsg.waterloo.edu:/pub/amoeba
[ ... more of the same ... ]
Jul 17 1988  128605 /mrcnext.cso.uiuc.edu:/ux1/amiga/fish/ff120/amoeba.zoo
Jul 17 1988  128605 /ux1.cso.uiuc.edu:/amiga/fish/ff120/amoeba.zoo

This is only tested under HPUX, but apart from 'remsh' which probably
is 'rsh' on your system, it doesn't use any HPUX specifics.

I just wrote this because I needed it, but if you find it useful feel
free to let me know :-).

        Carl Edman

------------------------- Cut here -----------------------------------
#! /bin/sh
# A little one-line script to call up archie, get the list of all files specified
# by the regular expression which is the first argument, sort these files by age
# and display them
echo "prog $1" | remsh quiche.cs.mcgill.ca -l archie "" | nawk "/Host/ { host = \$2 } /Last/ { cury = \$6 } /Location:/ { dir = \$2 } /FILE/||/DIRECTORY/ { if (index(\$6,\":\")) year = cury; else year = \$6; printf \"%3s %2s %4s %7s /%s:/%s/%s\\n\",\$4,\$5,year,\$3,host,dir,\$7 } { next }" - | sort +2nr -3 +0Mr -1 +1nr -2
------------------------- Cut here -----------------------------------

Theorectical Physicist,N.:A physicist whose  | Send mail
existence is postulated, to make the numbers |  to
balance but who is never actually observed   | cedman@golem.ps.uci.edu
in the laboratory.                           | edmanc@uciph0.ps.uci.edu
Re: A one-liner to find files in archive servers
#1994
Author: Carl Edman
Date: Fri, 21 Dec 1990 19:21
18 lines
1243 bytes
I'm informed that some people are having problems with the script,
which disappear when using 'gawk' instead of 'nawk'. If you are having
problems, try that. (And if that still doesn't work, mail me).

Also for systems which don't resolve internet-name into addresses
automatically , here are the internet addresses for
quiche.cs.mcgill.ca:

      132.206.2.3 or 132.206.51.1

        Carl Edman



Theorectical Physicist,N.:A physicist whose  | Send mail
existence is postulated, to make the numbers |  to
balance but who is never actually observed   | cedman@golem.ps.uci.edu
in the laboratory.                           | edmanc@uciph0.ps.uci.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads