On Feb 19, 8:34=A0pm, Kees Nuyt <k.n...@[EMAIL PROTECTED]
> wrote:
> On Mon, 18 Feb 2008 14:09:35 -0800 (PST), happytoday
>
> <ehabaziz2...@[EMAIL PROTECTED]
> wrote:
> >On Feb 17, 1:18=A0am, Kees Nuyt <k.n...@[EMAIL PROTECTED]
> wrote:
>
> [webserver script]
>
> >I did what you say I put the files in one directory like this , I got
> >the below error .
>
> If you want it all in one directory, you will have to
> change the scripts. I advice against it, though.
> For safety, the html documents should really be in a
> separate directory.
>
> > Can I got some little and small examples ?
>
> Juergen already answered that, the same example he
> mentioned is in Gawkinet_310.hlp.
>
>
>
>
>
> >H:\programs\sedawk\gawki>dir
> > Volume in drive H is U1_PROGRAMS
> > Volume Serial Number is E010-47D8
>
> > Directory of H:\programs\sedawk\gawki
>
> >02/16/2008 =A002:53 PM =A0 =A0<DIR> =A0 =A0 =A0 =A0 =A0.
> >02/16/2008 =A002:53 PM =A0 =A0<DIR> =A0 =A0 =A0 =A0 =A0..
> >02/16/2008 =A002:57 PM =A0 =A0 =A0 =A0 =A0 =A0 1,784 test.awk
> >02/19/2008 =A012:05 AM =A0 =A0 =A0 =A0 =A0 =A011,276 lakota.awk
> >02/19/2008 =A012:00 AM =A0 =A0 =A0 =A0 =A0 =A0 =A0 188 go.bat
> >02/18/2008 =A011:45 PM =A0 =A0 =A0 =A0 =A0 =A0 =A0 329 httpd.conf
> >06/03/2001 =A011:00 PM =A0 =A0 =A0 =A0 =A0 129,426 Gawkinet_310.hlp
> >07/05/2004 =A011:00 PM =A0 =A0 =A0 =A0 1,015,128 cygiconv-2.dll
> >08/09/2003 =A011:00 PM =A0 =A0 =A0 =A0 =A0 =A037,888 cygintl-2.dll
> >07/02/2005 =A011:00 PM =A0 =A0 =A0 =A0 1,295,582 cygwin1.dll
> >02/19/2008 =A012:06 AM =A0 =A0 =A0 =A0 =A0 =A010,954 lakota2.awk
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 9 File(s) =A0 =A0 =A02,502,555 bytes
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 2 Dir(s) =A0 5,359,321,088 bytes free
>
> >H:\programs\sedawk\gawki>go.bat
>
> >H:\programs\sedawk\gawki>gawki.exe "{gsub(/\t/,\" =A0 \");gsub(/
> >**the_magic**/,\"*
> >*some_magic**\");print}" lakota.awk =A0 1>lakota2.awk
>
> >H:\programs\sedawk\gawki>gawki.exe -f httpd.conf -f lakota2.awk
> >gawki: lakota2.awk:27: =A0 =A0doctype =A0 =A0 =A0=3D \
> >gawki: lakota2.awk:27: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^ backslash
no=
t last
> >character on line
>
> I guess an extra space was added by accident with
> cutting and pasting.
>
> >H:\programs\sedawk\gawki>type lakota.hit
> >The system cannot find the file specified.
>
> You can fill it with this line:
> 0 0 0 LakotaSessionsHitsBytes
> --
> =A0( =A0Kees
> =A0 )
> c[_] I don't even have an e-mail address. I have reached
> =A0 =A0 =A0an age where my main purpose is not to receive
> =A0 =A0 =A0messages. (Umberto Eco, quoted in the New Yorker) =A0(#522)-
Hi=
de quoted text -
>
> - Show quoted text -
I made it like this with nothing happened :
gawki -f test.awk test.dat
test.awk:
=3D=3D=3D=3D=3D=3D=3D=3D
BEGIN {
RS =3D ORS =3D "\r\n"
if (MyPort =3D=3D 0) MyPort =3D 8080
HttpService =3D "/inet/tcp/" MyPort "/0/0"
Hello =3D "<HTML><HEAD><TITLE>Out Of Service</TITLE>" \
"</HEAD><BODY><H1>" \
"This site is temporarily out of service." \
"</H1></BODY></HTML>"
Len =3D length(Hello) + length(ORS)
while ("awk" !=3D "complex") {
print "HTTP/1.0 200 OK" |& HttpService
print "Content-Length: " Len ORS |& HttpService
print Hello |& HttpService
while ((HttpService |& getline) > 0)
continue;
close(HttpService)
}
}


|