Solved

Batch file to create a web page thru cgi

Posted on 1998-04-20
2
456 Views
Last Modified: 2013-12-25
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
Comment
Question by:bigelos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
MaDdUCK earned 50 total points
ID: 1827655
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
 
LVL 3

Author Comment

by:bigelos
ID: 1827656
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
remove computer from using logon script 17 53
Run do it again at windows startup and execute the saved doit again sctipt 3 25
Power Action 2 46
powershell script error 2 34
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question