HP3000-L Archives

May 2000, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"COLE,GLENN (Non-HP-SantaClara,ex2)" <[log in to unmask]>
Reply To:
COLE,GLENN (Non-HP-SantaClara,ex2)
Date:
Thu, 25 May 2000 14:30:41 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
> Temporarily, here is what the script looks like:
>
> !#/bin/sh
> echo Content-type: text/html
> echo
> echo<html>
> echo <head>
[snip]

In addition to the problem Mark Bixby noted, where the
header line should be #!/bin/sh, I suspect you're going
to have problems with the '<' and '>' symbols, as they'll
be interpreted as meaning redirection.

A much easier technique is:

   #!/bin/sh
   cat <<end
   Content-type: text/html

   <html>
    <head>
   [snip]
   </html>
   end

   callci...

Note that the use of the word 'end' is arbitrary.  Choose
what you wish, but use the same string in both the 'cat'
command and at the end of what is to be written.

(This technique is called a "here document.")

--Glenn

ATOM RSS1 RSS2