summaryrefslogtreecommitdiffstats
path: root/contrib/awk/awklib/eg/network/urlchk.awk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/awk/awklib/eg/network/urlchk.awk')
-rw-r--r--contrib/awk/awklib/eg/network/urlchk.awk28
1 files changed, 0 insertions, 28 deletions
diff --git a/contrib/awk/awklib/eg/network/urlchk.awk b/contrib/awk/awklib/eg/network/urlchk.awk
deleted file mode 100644
index 6ddedfa..0000000
--- a/contrib/awk/awklib/eg/network/urlchk.awk
+++ /dev/null
@@ -1,28 +0,0 @@
-BEGIN {
- if (ARGC != 2) {
- print "URLCHK - check if URLs have changed"
- print "IN:\n the file with URLs as a command-line parameter"
- print " file contains URL, old length, new length"
- print "PARAMS:\n -v Proxy=MyProxy -v ProxyPort=8080"
- print "OUT:\n same as file with URLs"
- print "JK 02.03.1998"
- exit
- }
- URLfile = ARGV[1]; ARGV[1] = ""
- if (Proxy != "") Proxy = " -v Proxy=" Proxy
- if (ProxyPort != "") ProxyPort = " -v ProxyPort=" ProxyPort
- while ((getline < URLfile) > 0)
- Length[$1] = $3 + 0
- close(URLfile) # now, URLfile is read in and can be updated
- GetHeader = "gawk " Proxy ProxyPort " -v Method=\"HEAD\" -f geturl.awk "
- for (i in Length) {
- GetThisHeader = GetHeader i " 2>&1"
- while ((GetThisHeader | getline) > 0)
- if (toupper($0) ~ /CONTENT-LENGTH/) NewLength = $2 + 0
- close(GetThisHeader)
- print i, Length[i], NewLength > URLfile
- if (Length[i] != NewLength) # report only changed URLs
- print i, Length[i], NewLength
- }
- close(URLfile)
-}
OpenPOWER on IntegriCloud