From owner-freebsd-questions Thu Jul 16 15:15:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA29936 for freebsd-questions-outgoing; Thu, 16 Jul 1998 15:15:01 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from stage1.thirdage.com (stage1.ThirdAge.com [204.74.82.151]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA29928 for ; Thu, 16 Jul 1998 15:14:59 -0700 (PDT) (envelope-from jal@ThirdAge.com) Received: from gigi (budd.ThirdAge.com [204.74.82.199]) by stage1.thirdage.com (8.8.5/8.8.5) with SMTP id PAA17391; Thu, 16 Jul 1998 15:10:35 -0700 (PDT) Message-Id: <3.0.5.32.19980716150637.01c47ce0@204.74.82.151> X-Sender: jal@204.74.82.151 X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Thu, 16 Jul 1998 15:06:37 -0700 To: laszlo vagner , questions@FreeBSD.ORG From: Jamie Lawrence Subject: Re: off topic In-Reply-To: <199807160456.XAA24071@mutsgo.kf7nn.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 11:56 PM 7/15/98 -0500, laszlo vagner wrote: >if i run top and send it to a file like this >top > file.txt i can look at it perfectly >in a web browser but if i run it as a cgi >script the output looks all bunched together >like it is missing carriage returns. > >how can i format it so it displays in a cgi >script. Return it as HTML. At the top: Content-type: text/html top

your output here, then at the bottom: 


Make very sure you follow the content-type line with two newlines - that's part of the spec and a frequently made mistake. -j To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message