/usr/share/doc/gawk/examples/network
NameSizeModeActions
coreserv.awk33910644editdlrm
eliza.awk102200644editdlrm
fingerclient.awk1610644editdlrm
geturl.awk7870644editdlrm
hello-serv.awk4630644editdlrm
maze.awk26550644editdlrm
mobag.awk28410644editdlrm
panic.awk5750644editdlrm
PostAgent.sh2740644editdlrm
protbase.awk4000644editdlrm
protbase.request1620644editdlrm
protbase.result6420644editdlrm
remconf.awk21860644editdlrm
statist.awk36120644editdlrm
stoxdata.txt1650644editdlrm
stoxpred.awk56370644editdlrm
testserv.awk3340644editdlrm
urlchk.awk10530644editdlrm
webgrab.awk1870644editdlrm
Edit: /usr/share/doc/gawk/examples/network/geturl.awk (787B)
BEGIN { if (ARGC != 2) { print "GETURL - retrieve Web page via HTTP 1.0" print "IN:\n the URL as a command-line parameter" print "PARAM(S):\n -v Proxy=MyProxy" print "OUT:\n the page content on stdout" print " the page header on stderr" print "JK 16.05.1997" print "ADR 13.08.2000" exit } URL = ARGV[1]; ARGV[1] = "" if (Proxy == "") Proxy = "127.0.0.1" if (ProxyPort == 0) ProxyPort = 80 if (Method == "") Method = "GET" HttpService = "/inet/tcp/0/" Proxy "/" ProxyPort ORS = RS = "\r\n\r\n" print Method " " URL " HTTP/1.0" |& HttpService HttpService |& getline Header print Header > "/dev/stderr" while ((HttpService |& getline) > 0) printf "%s", $0 close(HttpService) }