From owner-freebsd-questions@FreeBSD.ORG Sun Apr 12 20:58:03 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2451C1065673 for ; Sun, 12 Apr 2009 20:58:03 +0000 (UTC) (envelope-from modulok@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.169]) by mx1.freebsd.org (Postfix) with ESMTP id EBFAF8FC08 for ; Sun, 12 Apr 2009 20:58:02 +0000 (UTC) (envelope-from modulok@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so1541540wfg.7 for ; Sun, 12 Apr 2009 13:58:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=QJPeUiI1Z9r5UVgiudZCVJgsJs4FqNsyUoXlO4jqpG4=; b=p5fQHQ9pMkIbGTY14ws4ufHTX1BZckZxHR3xATwE6Aam8OFqO/ZBfwnsuASbpaLg0Y fgBlQQdabgQUriI8/OcBf8qZSf+8dbvzuDEIhLTdy1ZWt66Hyl7m0+9ZQz73kjnUU/GI ad9dabtS2+JqOcfxQmrE8w+ns+r7+cuie8BTI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=lvaoQmmR1FvVmsiO4VfQJwtbHubesLzruKSiPaiegH2oTo3xthaw2xzOhlhk8A6TR7 gKVr9rbkWipGk/2sGsj2p7qjn9ylCPCeubSP88WViiAMSSPF1EEaxZK45LntuaAfuGZ2 /oWGK1s1Fikmi6INPZyjwPuTSe/6ERtlJAKdU= MIME-Version: 1.0 Received: by 10.142.44.11 with SMTP id r11mr2309563wfr.186.1239569881178; Sun, 12 Apr 2009 13:58:01 -0700 (PDT) In-Reply-To: <845EB734-909E-4B97-9ABD-8ABBADFA291B@charter.net> References: <251E39DC-2EEE-4E43-9B4C-3F273B19AD09@charter.net> <18912.60033.242203.912434@jerusalem.litteratus.org> <845EB734-909E-4B97-9ABD-8ABBADFA291B@charter.net> Date: Sun, 12 Apr 2009 14:58:01 -0600 Message-ID: <64c038660904121358r4f2e7282nc2bc09af7b94a7f9@mail.gmail.com> From: Modulok To: Charles Howse Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions Subject: Re: /usr/bin/calendar in cgi script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Apr 2009 20:58:03 -0000 I don't know what program you're using for your CGI stuff, but basically all that is needed is the '
' tags. Here is an
example which uses PHP to call the system 'calendar' command:




	
	Modulore Training Media

Hello world. Calling UNIX calendar program via PHP:


On 4/11/09, Charles Howse wrote: > > On Apr 11, 2009, at 2:07 PM, Robert Huff wrote: > >> >> Charles Howse writes: >> >>> Now, when I run that script in a terminal, the output is perfectly >>> formatted, multiple lines (if there are multiple events on this >>> date), >>> date first, event, year. Just right. >>> >>> But, when I put that in an "include" statement in a webpage, the >>> output is a single line, regardless of whether there are multiple >>> events. >>> You can see a bad example here: >>> >>> >>> >>> How can I make multiple events show on separate lines, like it >>> does in terminal? >> >> Would I be correct in believing you're unfamiliar with html? > > You would most certainly NOT BE CORRECT. I've had my own server > running Apache for years. > > I don't think this is something that can be solved with html tags, but > I will try Brad's suggestions. > Read man calendar about how it uses cpp, and how the calendar.* files > are formatted. > If I recall, I used this same technique years ago and had a simple, > elegant way of solving it using some default tool like col, though > that doesn't seem to work now. > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >