Sponsored Content
Top Forums Shell Programming and Scripting How to generate HTML page from UNIX script out-put? Post 302774437 by bakunin on Friday 1st of March 2013 11:12:22 PM
Old 03-02-2013
In the function you write a file "tap" which you never use subsequently. Instead you use a file "asap.log", which should be filled with the <stdout> of the function, but there is none, as the only possible output is redirected to "tap".

Your script contains severe syntax errors ("if" without a closing "fi") and can never have run the way you present it.

Look at any HTML-document and you will notice that it is clear text with a fixed structure and tags mixed with the text. Search the web for any HTML reference (there is an abundance of them) and most of them will not only explain the general structure of such an HTML file but also the meaning of every tag. Consult such a reference/introduction and write such a file using "print" (if you use ksh) or "echo" (if you use bash) or whatever output command your shell has - finished.

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Unix Manual (man-page) pages in HTML

LINK: Unix Manual (man page) pages in HTML http://www.rt.com/man/ : More then 100 Commands found on a Unix system mannual pages can be obtained/refered here. Good Link.. (1 Reply)
Discussion started by: killerserv
1 Replies

2. Shell Programming and Scripting

linking unix generated text file to html page

i am trying to link the text files that i generated from my shell script to an html page, to that i can view them using a browser, like internet explorer. i want to open the text files in html page when i enter a command to view the text file from the shell command. please could anyone help... (1 Reply)
Discussion started by: alexd
1 Replies

3. UNIX and Linux Applications

Html web page to Unix Connectivity

Hi All, I need a basic overview of connecting a HTML web page to Unix I will give a brief of my exact requirement. There will be a front end HTML page - a web page which will have certain buttons. Each button will have certain functionality. For eg: There is a button for Disk Usage. When the... (1 Reply)
Discussion started by: abhilashnair
1 Replies

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

5. Web Development

Login page in html on unix

I want to create a login page in HTML which is hosted on apache server. The login page first authenticate the user and then directed to a form which in turn run a script on the server. I want to make login page without php or jsp. Please advice. (13 Replies)
Discussion started by: ravi18s
13 Replies

6. Shell Programming and Scripting

Execute unix command from an html page in windows

i have a problem situation, where i have a html file say click.html. i have a button "ls" in that html page. i run this html file in windows....Now say if i click that "ls" button it must connect to the unix server and execute ls and return the results back to html page in windows. can anyone tell... (8 Replies)
Discussion started by: niteesh_!7
8 Replies

7. Shell Programming and Scripting

Migrating from Shell Script to HTML Page

Hi, Need Help, Recently I have thought to migrating my Korn Shell Scripts to html page..., already webserv is running on my unix machine. How to migrate the shell scripts to html page.. Please refer any web portal or sample codes. Thanks in Adavce (2 Replies)
Discussion started by: l_gshankar24
2 Replies

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

9. AIX

How to Use a UNIX Shell Script to Create an HTML Web Page?

dear friends , in my work i have to monitor some system performance in hourly basis by runing some commands , for example (lpstat) to know that all the queue is ready how can i create webpage and connect it with the server (AIX operating system) and make this page refreshed every 10 second and... (12 Replies)
Discussion started by: rami abusweilei
12 Replies

10. 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
HTML::HeadParser(3)					User Contributed Perl Documentation				       HTML::HeadParser(3)

NAME
HTML::HeadParser - Parse <HEAD> section of a HTML document SYNOPSIS
require HTML::HeadParser; $p = HTML::HeadParser->new; $p->parse($text) and print "not finished"; $p->header('Title') # to access <title>....</title> $p->header('Content-Base') # to access <base href="http://..."> $p->header('Foo') # to access <meta http-equiv="Foo" content="..."> DESCRIPTION
The HTML::HeadParser is a specialized (and lightweight) HTML::Parser that will only parse the <HEAD>...</HEAD> section of an HTML document. The parse() method will return a FALSE value as soon as some <BODY> element or body text are found, and should not be called again after this. The HTML::HeadParser keeps a reference to a header object, and the parser will update this header object as the various elements of the <HEAD> section of the HTML document are recognized. The following header fields are affected: Content-Base: The Content-Base header is initialized from the <base href="..."> element. Title: The Title header is initialized from the <title>...</title> element. Isindex: The Isindex header will be added if there is a <isindex> element in the <head>. The header value is initialized from the prompt attribute if it is present. If no prompt attribute is given it will have '?' as the value. X-Meta-Foo: All <meta> elements will initialize headers with the prefix ""X-Meta-"" on the name. If the <meta> element contains a "http-equiv" attribute, then it will be honored as the header name. METHODS
The following methods (in addition to those provided by the superclass) are available: $hp = HTML::HeadParser->new( [$header] ) The object constructor. The optional $header argument should be a reference to an object that implement the header() and push_header() methods as defined by the HTTP::Headers class. Normally it will be of some class that isa or delegates to the HTTP::Headers class. If no $header is given HTML::HeadParser will create an HTTP::Header object by itself (initially empty). $hp->header; Returns a reference to the header object. $hp->header( $key ) Returns a header value. It is just a shorter way to write "$hp->header->header($key)". EXAMPLE
$h = HTTP::Headers->new; $p = HTML::HeadParser->new($h); $p->parse(<<EOT); <title>Stupid example</title> <base href="http://www.linpro.no/lwp/"> Normal text starts here. EOT undef $p; print $h->title; # should print "Stupid example" SEE ALSO
HTML::Parser, HTTP::Headers The HTTP::Headers class is distributed as part of the libwww-perl package. COPYRIGHT
Copyright 1996-2001 Gisle Aas. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.0 2002-03-11 HTML::HeadParser(3)
All times are GMT -4. The time now is 04:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy