The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to generate html file using script? kittusri9 Shell Programming and Scripting 2 05-25-2008 11:38 PM
cgi script to echo a html file Performer Shell Programming and Scripting 1 04-01-2008 06:16 AM
Unix Shell Script along with .HTML ronix007 UNIX for Dummies Questions & Answers 3 01-07-2008 09:15 AM
how to Invoke html in ksh Script ali560045 Shell Programming and Scripting 4 11-30-2007 01:28 AM
Converting Shell Script to HTML davwel Shell Programming and Scripting 3 10-25-2007 10:25 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-08-2005
frustrated1 frustrated1 is offline
Registered User
  
 

Join Date: Aug 2003
Location: Ireland
Posts: 278
html - df -k cgi script

Hey - I am new to cgi scripting... just writing a script to output df -k output to html page... but I cannot get the df lines on separate lines on the page, it all comes out on one line and is not very readable.. any suggestions?

My script is below - please keep in mind I am only new to it so its probably a bit messy


#!/usr/bin/sh

UNAME=`uname -n`
DSPA=`df -k`

cat <<"--END--"
Content-type: text/html

<html>
<head><title>Test Page</title></head>
<body bgcolor="#ffffff">
<font face="helvetica">
--END--

echo "<h2>Welcome to $SERVER_NAME"
cat <<"--END--"
<hr size=1 noshade></h2>
<p>
--END--

echo "<font size=\+2\">Server physical host is $UNAME </font>"
echo "<font size=\+2\">Disk Space: $DSPA</font>"
cat <<"--END--"
<p>

<hr size=1 noshade>
</font>
</body>
</html>
--END--
  #2 (permalink)  
Old 12-09-2005
Neo's Avatar
Neo Neo is offline Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,670
Try PHP for CGI-stype scripting. Much better than legacy UNIX shells when web programming...... FWIW.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:03 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0