how to generate html file using script?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to generate html file using script?
# 1  
Old 05-06-2008
MySQL how to generate html file using script?

Hi Friends

I have an requirement that i need to generate html file using script.

and the script output shold keep adding to that html file like tablewise.

can anyone please help me out in this.

thanks
Krish.
# 2  
Old 05-26-2008
sure this is possible but without any sample input data and wished output format nobody will help you in this.
# 3  
Old 05-26-2008
Agreed. I use bash scripts for my cgi and output plenty of data, building HTML on the fly.

For example, I have a help topics page for my wife that is entirely scripts. I add a small text file, and the script formats it and puts it on the webpage in alphabetical order.

I.e:

Clothing_And_Shoes

would be the name of the text file, and inside would be some simple information.

Here's a copy of a script named ShowHelp.cgi that would be called from index.shtml (SSI must be enabled) and would output the text files:

Code:
#!/bin/sh
cnt=0
printf 'content-type: text/html\n\n'
LST=`ls|grep -v cgi|grep -v html`
for i in $LST
 do
  cnt=$(($cnt+1))
  LNK=$i
  NM=`echo $i|tr '_' ' '`
  printf "<tr><td align=justify bgcolor=white><center><a name=$LNK>Note $cnt:<b>&nbsp;&nbsp;$NM</b></center><br>"
  printf '<table border=0 align=center cellpadding=0 cellspacing=0 bgcolor=white><tr><td align=justify>'
  cat $i
  printf "<p align=center><a href=#TOP>Top of Page</a></p>"
  printf "</td></tr></table>"
  printf "</td></tr>"
done

Hopefully that will help, but as scarfake said, without some information of what precisely you need, we're just guessing.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to generate csv file

Dears, I am new in shell world and I need your help in this, I have to create a report based on the output file generated by another program. I want to write a shell script for this. The output file generated every 15 minutes but i can’t open it until the end of day so the script will get the... (3 Replies)
Discussion started by: abdul2020
3 Replies

2. Shell Programming and Scripting

Script to generate HTML output format listing like orasnap

Hi, Is there any UNIX scripts out there that generates a listing output of some sort similar to OraSnap At the moment, I have a script that I run on multiple servers that has multiple databases and just querying the database sizes of those databases. It generates a text files that contains... (0 Replies)
Discussion started by: newbie_01
0 Replies

3. UNIX for Dummies Questions & Answers

Need script to generate file.

Hi I have a file "test" with data as below 1,APRIL,NEW,"New market,delhi,pune,India",RECENT, 254664 2,MARCH,OLD,"New Area,Mumbai,UP,India",CURRENT, 152483 So I want a script which provides output as below 1,APRIL,RECENT,254664 2,MARCH,CURRENT,152483 I am aware we can use awk/sed... (9 Replies)
Discussion started by: sv0081493
9 Replies

4. Shell Programming and Scripting

How to generate HTML page from UNIX script out-put?

Hi All. This my first post to this forum, and i assuming it will be best out-of all. I am quite new to Unix scripting so please excuse me for any silly questions - I am trying to create on Unix script in which it telnet to my server, check the connectivity of the server and then it... (2 Replies)
Discussion started by: HHarsh
2 Replies

5. Shell Programming and Scripting

Needed script to FTP a File and generate a quality checksum file

hi all i want a script to FTP a file and should generate a quality checksum file means when I FTP a file from one server to another server it should generate a QC file which should contain timestamp,no.of records in that file Thanks in advance saikumar (3 Replies)
Discussion started by: hemanthsaikumar
3 Replies

6. Shell Programming and Scripting

Script To Generate HTML output

Hello All, I need help here with a script. I have a script here which generates a html output with set of commands and is working fine. Now i want to add a new command/function which would run on all the remote blades and output should be included in this html file. Here is the script ... (2 Replies)
Discussion started by: Siddheshk
2 Replies

7. UNIX for Dummies Questions & Answers

How to generate html reports through LINUX Scripting?

Hi All, I am trying to generate a weekly HTML report using LINUX Scripting. This will have record counts of some files. (like below) touch path/filename.html echo "Weekly Summary Report for Business Date : $P_BUS_DT">path/filename.html export A1=`cat path/filename1.txt |wc -l` echo "A1... (6 Replies)
Discussion started by: dsfreddie
6 Replies

8. Shell Programming and Scripting

Script to generate csv file

Hello; I need to generate a csv file that contains a list of all the files in a particular server (from the root directory ie: \) that have a permission stamp of 777. I would like to create the csv so that it contains the following: server name, file name, full path name where file exists,... (17 Replies)
Discussion started by: gvolpini
17 Replies

9. Shell Programming and Scripting

KSH - help needed for creating a script to generate xml file from text file

Dear Members, I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input. The contents of a single cell of INFO column is like: Area:app - aam Clean Up Criteria:... (0 Replies)
Discussion started by: Yoodit
0 Replies

10. Shell Programming and Scripting

Generate report in HTML file from Oracle DB

Hi Team, I need a suggestion/comments for my below requirement. I have a procedure which performs some DDL operations & loads data into a Oracle table. This status contains Audit data. What i wanted to do is, once the procedure is completed (daily), shell script should retrive the data from the... (4 Replies)
Discussion started by: Amit.Sagpariya
4 Replies
Login or Register to Ask a Question