Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
20
Task/HTTP/AWK/http.awk
Normal file
20
Task/HTTP/AWK/http.awk
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
BEGIN {
|
||||
site="en.wikipedia.org"
|
||||
path="/wiki/"
|
||||
name="Rosetta_Code"
|
||||
|
||||
server = "/inet/tcp/0/" site "/80"
|
||||
print "GET " path name " HTTP/1.0" |& server
|
||||
print "Host: " site |& server
|
||||
print "\r\n\r\n" |& server
|
||||
|
||||
while ( (server |& getline fish) > 0 ) {
|
||||
if ( ++scale == 1 )
|
||||
ship = fish
|
||||
else
|
||||
ship = ship "\n" fish
|
||||
}
|
||||
close(server)
|
||||
|
||||
print ship
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue