Re[2]: verify URL

Jim Meritt (jmeritt@smtpinet.aspensys.com)
Wed, 08 May 96 11:54:30 EST



I'm looking at this again. What's $2?

Jim

______________________________ Reply Separator _________________________________
Subject: Re: verify URL
Author: robots@webcrawler.com at SMTPINET
Date: 3/13/96 8:57 PM

> Is there a simple/short/free app that can check for the presence of a
> URL and return a yes/no if it can get it?

What about this one:

======================================================================
#!/bin/sh

code=`/bin/echo "HEAD $2 HTTP/1.0\n" | telnet $1 80 | awk '/^HTTP\/*\.*/ { print
$2; exit }'`
if [ "$code" = 200 ]; then
echo yes
else
echo no
fi
======================================================================

+--------------------------+------------------------------------+
| | |
| Christophe TRONCHE | E-mail : tronche@lri.fr |
| | |
| +-=-+-=-+ | Phone : 33 - 1 - 69 41 66 25 |
| | Fax : 33 - 1 - 69 41 65 86 |
+--------------------------+------------------------------------+
| ###### ** |
| ## # Laboratoire de Recherche en Informatique |
| ## # ## Batiment 490 |
| ## # ## Universite de Paris-Sud |
| ## #### ## 91405 ORSAY CEDEX |
| ###### ## ## FRANCE |
|###### ### |
+---------------------------------------------------------------+