/* REXX */
parse arg who

crlf = d2c(13) || d2c(10)

say "Content-type: text/html"
say ""

say "<TITLE>Finger Gateway</TITLE>"
say "<H1>Finger Gateway</H1>"

if who = "" then do
   say  "<ISINDEX>"
   say "This is a gateway to finger. Type a user@host combination in"
   say "your browser's search dialog.<P>"
end
else do
   '@finger.exe' who '| RXQUEUE'
   data = "<pre>"
   do queued()
      parse pull what
      if what = d2c(13) | what = d2c(10) then 
         iterate
      data = data || what || '<BR>' || crlf
   end
   data = data || "</pre>"
   say data
end
exit

