Sponsored Content
Top Forums Shell Programming and Scripting How to generate HTML page from UNIX script out-put? Post 302774421 by HHarsh on Friday 1st of March 2013 10:27:19 PM
Old 03-01-2013
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 generate the out-put.

I am getting correct output and everything is fine.

Now i want to extend that to some extend -

Now i want to the output of the script i should get in HTML formats in email.

Code:
conct_asap () {
cd ${home}
 telnet 10.97.111.111 40003 >tap <<EOF
^]
quit
EOF
}
conct_asap 2>asap.log 1>asap.log

grep "Connected" ${home}/asap 2>/dev/null 1>/dev/null
clear
if [ $? -eq 0 ];then
 echo "1]. ${bold}ASAP Check${unbold}"
 echo "_________________________________"
 echo "Connectivity --> UP and Running"

-----------------------------------------------------------------------
So will it possible to generate HTML out-put and send to my mail box ?Smilie

Moderator's Comments:
Mod Comment edit by bakunin: two thirds of your post were redundant FONT-, SIZE-, and whatnot-tags, which i just cleared out. Many thanks for creating that work for me, i wouldn't know what to do the whole day otherwise. The only tag you should have used - the CODE-tag - was missing, so i put it in. Was there anything not understandable in "Please use CODE-tags"? Or was it the button for the CODE-tag, which is so deceptively labeled "CODE"?

Last edited by bakunin; 03-02-2013 at 12:02 AM..
 

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
pud-faq(7)							  MISCELLANEOUS 							pud-faq(7)

  NAME
	  pud-faq - faqs and facts about the Portable Unix Documentation FAQ authoring language.

	  This	document  describes  the Portable Unix Documentation (PUD) faq mini-language in the style of a FAQ. PUD-faq is built on top of the
	  macro interpreter zoem. A PUD document is generally well-structured, relatively free of formatting statements, compact to write and eas-
	  ily  extendable.  It	can  be converted to both troff and html, for viewing in terminals and browsers. High quality Postscript and plain
	  text formats can be derived from the troff output. Refer to pud-man for examples.

  DESCRIPTION
	  The PUD faq macros extend the PUD manual macros; a PUD faq document must import both man.zmm and faq.zmm. There are  only  a	few  addi-
	  tional faq macros in faq.zmm. The overall layout of a faq document is as follows:

	  import{man.zmm}
	  import{faq.zmm}

	  egin{pud::man}{
	     {name}{pud-faq}
	     {html_title}{The PUD faq mini-language FAQ}
	     {author}{Stijn van Dongen}
	     {section}{7}
	  }

	  "faq::preamble"

	  ${html}{"man::maketoc"}

	  sec{toc}{TOC}
	  "faq::maketoc"

	  egin{faqsec}{{ref}{Labelx}{cap}{Captionx}}
	     content
	  end{faqsec}

	  egin{faqsec}{{ref}{Labely}{cap}{Captiony}}
	     content
	  end{faqsec}

	  end{pud::man}

	  The PUD manual macros are documented in the pud-man manual page.

	  Create your FAQ according to the lay-out above and as described further below. Refer to Question 2.3 for full-size examples.

	  Once you have written your FAQ, process it as follows.

	     zoem -i your-faq.azm -d html
	     zoem -i your-faq.azm -d html
	     zoem -i your-faq.azm -d roff -o your-faq.7
	     zoem -i your-faq.azm -d roff -o your-faq.7

	  This generates files your-faq.html and your-faq.7.  Each device is run twice to be certain that references are found and linked.

  RESOURCES
	  o The Zoem User Manual.
	  o The pud-man manual page.

  TOC
  1...... How do I create and link to questions and sections?
   1.1... How do I start a section?
   1.2... How do I make a faq entry?
   1.3... How do I link to a question?
   1.4... How do I link to a section?
   1.5... Is that not a whole lot of typing just for linking?

  2...... Miscellaneous
   2.1... Is it really possible to have more than one section?
   2.2... Is there an easy way to get back to the TOC?
   2.3... Show me a real FAQ, not this nonsense.
   2.4... I want to change the appearance of my FAQ.
   2.5... Show me the source to this FAQ.

  FAQ
						    How do I create and link to questions and sections?

   1.1	  How do I start a section?

	  You would for example type

	  egin{faqsec}{
	     {ref}{kind}
	     {cap}{How do I link to questions and sections?}
	  }

   1.2	  How do I make a faq entry?

	  You create an entry as follows:

	  faq{q_question}{How do I make a faq entry?}
	     You create an entry as follows:
	     ...

   1.3	  How do I link to a question?

	  car{Like this: linking to
	  iref{q_qlink}{Question~
efnumber{q_qlink}},
	  or a silly link to the iref{q_qlink}{current question}.
	  Linking to iref{s_basics}{Question~
efnumber{q_slink}},
	  or a link to the iref{q_slink}{next question}.}

	  par{
	  Of course, you have to use wordings such that the
	  text still makes sense in the absence of links
	  (assuming you are intested in the troff version of
	  the FAQ you are writing), so normally you just refer to
	  iref{q_slink}{Question~
efnumber{q_slink}} and be done
	  with it.}

	  Like this: linking to Question 1.3, or a silly link to the current question.	Linking to Question 1.4, or a link to the next question.

	  Of course, you have to use wordings such that the text still makes sense in the absence of links (assuming you are intested in the troff
	  version of the FAQ you are writing), so normally you just refer to Question 1.4 and be done with it.

   1.4	  How do I link to a section?

	  car{Like this: linking to
	  iref{q_qlink}{Section~
efnumber{s_basics}} and
	  linking to iref{q_stupid}{Section~
efnumber{s_stupid}}.}

	  Like this: linking to Section 1 and linking to Section 2.

   1.5	  Is that not a whole lot of typing just for linking?

	  It sure is. Note the repeating elements though. Feel free to create your own shortcuts by using Zoem's macro facilities.

								       Miscellaneous

   2.1	  Is it really possible to have more than one section?

	  QED

   2.2	  Is there an easy way to get back to the TOC?

	  In the HTML version of the faq, one can click on the number to the left of the question; this will take you to the top of the  TOC  part
	  pertaining to the section that question belongs to.

   2.3	  Show me a real FAQ, not this nonsense.

	  The  reason I began writing zoem and PUD was that I wanted decent (both HTML and troff) and easy to write documentation for my implemen-
	  tation of the MCL cluster algorithm.

	  o http://micans.org/mcl/src/mcl-latest/doc/mclfaq.azm
	  o http://micans.org/mcl/src/mcl-latest/doc/mclfaq.html
	  o http://micans.org/mcl/src/mcl-latest/doc/mclfaq.ps

   2.4	  I want to change the appearance of my FAQ.

	  Well, you need to make a copy of the faq macros and possibly the man macros, and hack those changes in.  Zoem itself is  very  flexible,
	  but  the  PUD faq macros are not, in this respect. They can be made so, if you wish.	If you just want to change or add some style sheet
	  rules for the HTML version, it will be quite easy.  The same holds for changing font styles and possibly even spacing rules.

   2.5	  Show me the source to this FAQ.

	  Search for pud-faq.azm in your install of zoem.  Take note though that I played a few silly tricks in this FAQ, so the source looks more
	  unreadable than your average FAQ.  The FAQ pointed to in Answer 2.3 gives a more realistic impression.

  AUTHOR
	  Stijn van Dongen.

  SEE ALSO
	  The pud-man manual page, documenting the PUD manual language. The FAQ language imports the manual definitions and you use these e.g. for
	  sectioning commands as described above.

	  The pud manual page gives an overview of PUD.

  pud-faq 1.002, 10-008 					      8 Jan 2010							  pud-faq(7)
All times are GMT -4. The time now is 07:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy