Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 460
  • Last Modified:

Batch file to create a web page thru cgi

Setup:  web server residing on NT file server.

Question:
I'm trying to generate a web page using a simple batch file.  However, the problem I'm running into is in echoing a blank line to the webserver after
Content-type: text/html

In Perl, this would be
print "Content-type: text/html\n\n";

In DOS, I'm using
@echo off
echo Content-type: text/html


Now, how do I echo a blank line?  Type echo on a line by itself just echos echo is off.

It seems to me that this question should be really easy, but if it isn't, let me know.

Thanks!
0
bigelos
Asked:
bigelos
1 Solution
 
MaDdUCKCommented:
Use the command 'echo.' (echo followed by a period). This will output \n to stdout.

Ths your code is:
@echo off
echo Content-type: text/html
echo.
echo.
echo <html>
...

hope this helps...
\\madduck
0
 
bigelosAuthor Commented:
MaDdUCK,

Thanks.  I knew it was something like that, but I had the space between echo and the period, and that wasn't working very good.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now