Solved

Batch file to create a web page thru cgi

Posted on 1998-04-20
2
457 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
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 the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

628 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