Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to generate html reports through LINUX Scripting? Post 302620583 by agama on Sunday 8th of April 2012 09:40:56 PM
Old 04-08-2012
You need to generate a complete HTML document. Check out the tutorial here: HTML Tutorial

In short you need something along these lines:

Code:
(
  printf "<html>\n<head>\n<title>doument title</title>\n</head>\n<body>\n"
  echo  "Weekly Summary Report for Business Date : $P_BUS_DT"
  A1=`wc -l <path/filename1.txt `
  echo  "A1 Groups : $A1 <break>"
  A2=`wc -l <path/filename2 `
  echo  "A2 Groups : $A2"
  printf "</body>\n</html>\n"
) >path/filename.html

You'll also need to read up on how to properly format your output. For instance, if the output of any of your commands contains a greaterthan symbol (>) for instance, you'll need to convert it to a proper representation so that it is not interpreted by the browser as a part of HTML syntax.

If that's too much, then if you create a file with a .txt extention, most browsers render that as though it were contained in a complete HTML document with <pre> and </pre> tags around it.

Last edited by agama; 04-08-2012 at 10:43 PM.. Reason: removed useless uses of cat that I didn't catch in the original post
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

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 Replies)
Discussion started by: kittusri9
2 Replies

2. 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

3. UNIX and Linux Applications

Installation of Oracle Reports 6i on Linux

Hi, We are planning for a report generation program in Linux.For that we are planning to use Oracle reports 6i on linux. Could anybody please confirm if the Oracle 6i reports are compatible on Linux (0 Replies)
Discussion started by: Pavan Pusuluri
0 Replies

4. Shell Programming and Scripting

generate tabular output from an input text file in unix shell scripting

Hi, I have the output (as below) which i want it to be in a table. For e.g. space utilization in PSE on path /logs is 0% space utilization in PSE on path /logs/tuxedo/tuxlsp is 16% space utilization in PSE on path /ldvarlsp/lsp/log is 37% space utilization in PSE on path /home is 6%... (7 Replies)
Discussion started by: pkbond
7 Replies

5. Shell Programming and Scripting

Generate a Execution time reports using log files.

Hi Experts, I am having a requirement, where i need to generate a report of the execution time of all the processes. All the processes generate the log files in a log directory and I can get the execution time from the log files. like below is the log file. /home/vikas/log >ls -l... (2 Replies)
Discussion started by: k_vikash
2 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. 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

8. Shell Programming and Scripting

Generate sql statement using shell scripting

Can anyone please assist me? I have attached 2 input files and one output file. I need to generate the sql update statements using the above 2 input files. if inputfile2 has 5 rows, then we should generate 5 update statements because column1 is unique. inputfile1 and inputfile2 may contain more... (10 Replies)
Discussion started by: vinus
10 Replies

9. 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

10. Shell Programming and Scripting

UNIX/Linux help in concatenation of multiple reports

Hi, I have the following reports that get generated every 1 hour and this is my requirement: 1. 5 reports get generated every hour with the names "Report.Dddmmyy.Thhmiss.CTLR" "Report.Dddmmyy.Thhmiss.ACCD" "Report.Dddmmyy.Thhmiss.BCCD" "Report.Dddmmyy.Thhmiss.CCCD"... (1 Reply)
Discussion started by: Jesshelle David
1 Replies
Mojo::DOM::HTML(3pm)					User Contributed Perl Documentation				      Mojo::DOM::HTML(3pm)

NAME
Mojo::DOM::HTML - HTML5/XML engine SYNOPSIS
use Mojo::DOM::HTML; # Turn HTML5 into DOM tree my $html = Mojo::DOM::HTML->new; $html->parse('<div><p id="a">A</p><p id="b">B</p></div>'); my $tree = $html->tree; DESCRIPTION
Mojo::DOM::HTML is the HTML5/XML engine used by Mojo::DOM. ATTRIBUTES
Mojo::DOM::HTML implements the following attributes. "charset" my $charset = $html->charset; $html = $html->charset('UTF-8'); Charset used for decoding and encoding HTML5/XML. "tree" my $tree = $html->tree; $html = $html->tree(['root', [qw(text lalala)]]); Document Object Model. "xml" my $xml = $html->xml; $html = $html->xml(1); Disable HTML5 semantics in parser and activate case sensitivity, defaults to auto detection based on processing instructions. METHODS
Mojo::DOM::HTML inherits all methods from Mojo::Base and implements the following new ones. "parse" $html = $html->parse('<foo bar="baz">test</foo>'); Parse HTML5/XML document. "render" my $xml = $html->render; Render DOM to XML. SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojo::DOM::HTML(3pm)
All times are GMT -4. The time now is 06:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy