head     1.3;
branch   ;
access   ;
symbols  ;
locks    ; strict;
comment  @# @;


1.3
date     95.06.08.22.52.47;  author root;  state Exp;
branches ;
next     1.2;

1.2
date     95.01.18.14.29.51;  author root;  state Exp;
branches ;
next     1.1;

1.1
date     94.07.15.06.30.37;  author nocturne;  state Exp;
branches ;
next     ;


desc
@homepage fetcher
@


1.3
log
@fixed double-slash error
@
text
@#!/usr/local/bin/perl

$query = join(' ', @@ARGV) if $ARGV[0];
local($who) = $query;

open(HOME, "/var/local/www/root/home-pages.html");	

while(<HOME>){
	if(/<a name=\"([^\"]+)\" href=\"([^\"]+)\">/i){
		$name = $1;
		$url = $2;
		if($url !~ /^http/){
			$url = ("http://www.mit.edu:8001" . $url);
		}
	}
	
	if($name eq $who){
	    print("Location: $url\n\n");
	    exit;
	}
}
print("Location: http://www.mit.edu:8001/home-pages.html\n\n");
@


1.2
log
@nothing changed.
@
text
@d13 1
a13 1
			$url = "http://www.mit.edu:8001/$url";
@


1.1
log
@Initial revision
@
text
@a22 1

@
