Sponsored Content
Operating Systems AIX How to Use a UNIX Shell Script to Create an HTML Web Page? Post 302748553 by Shaishav Shah on Wednesday 26th of December 2012 07:05:00 AM
Old 12-26-2012
Consider $1="xyz.html"
Code:
echo "<head>" >> "$1"
	echo "<title>Testing Result</title>" >> "$1"
	echo "</head>" >> "$1"	
	echo "<body  bgcolor="#CCCCCC">" >> "$1"
	echo "<table width="100%" border="2" bordercolor="#000000">" >> "$1"
	echo "<tr bgcolor="#33CCFF">" >> "$1"
	echo "<td><div align="center"><strong>Testing</strong></div></td>" >> "$1"
	echo "</tr>" >> "$1"
	echo "</table>" >> "$1"
	echo "<table width="100%" border="2" bordercolor="#000000">" >> "$1"
	echo "<tr>" >> "$1"
	echo "<td>&nbsp;</td>" >> "$1"
	echo "</tr>" >> "$1"
	echo "</table>" >> "$1"
	echo "<table width="100%" border="2">" >> "$1"
	echo "<tr bgcolor=#33CCFF>" >> "$1"
	echo "<td><div align=center><strong>Testing Summary</strong></div></td>" >> "$1"
	echo "</tr>" >> "$1"
	echo "</table>" >> "$1"
	echo "<table width="100%" border="2">" >> "$1"
	echo "<tr>" >> "$1"
	echo "<td width=50%>Test Scenario Executed</td>" >> "$1"
	echo "<td width=50%>TEST_SCENARIO_EXECUTED</td>" >> "$1"
	echo "</tr>" >> "$1"
	echo "</table>" >> "$1"
	echo "<table width="100%" border="2">" >> "$1"
	echo "<tr>" >> "$1"
	echo "<td width=50%>Test Cases Executed</td>" >> "$1"
	echo "<td width=50%>TEST_CASE_EXECUTED</td>" >> "$1"
	echo "</tr>" >> "$1"
	echo "</table>" >> "$1"
	echo "<table width="100%" border="2">" >> "$1"
	echo "<tr>" >> "$1"
	echo "<td width=25%>PASS</td>" >> "$1"
	echo "<td width=25%>PASS_CASES</td>" >> "$1"
	echo "<td width=25%>FAIL</td>" >> "$1"
	echo "<td width=25%>FAIL_CASES</td>" >> "$1"
	echo "</tr>" >> "$1"
	echo "</table>" >> "$1"
	echo "<table width="100%" border="2">" >> "$1"
	echo "<tr>" >> "$1"
	echo "<td>&nbsp;</td>" >> "$1"
	echo "</tr>" >> "$1"
	echo "</table>" >> "$1"
	echo "</body>" >> "$1"	
	echo "</html>" >> "$1"

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

running shell script thru WEB page ....

....passing variable via list... here 's the HTML code extract : **************** <form method=post action=http://servername/cgi-bin/cgi-comptage_diff.ksh> <table border...........> .............. </table> <table bgcolor=#FFFFFF width="980"> ... (6 Replies)
Discussion started by: Nicol
6 Replies

2. Shell Programming and Scripting

Invoking shell script from html/jsp page

I want to invoke shell script named bubesh.sh when submit button clicked on html/jsp page.I am using an apache server and the html & shell script are in the same working directory.Please help. (2 Replies)
Discussion started by: bubeshj
2 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 redirect to a web-page by shell script

Dear all, I am calling a korn shell script(CGI script) by a web-page. This shell script do some checking in a unix file and return true or false. Now within the same script, If it returns true then I want to redirect to another web-page stored in htdocs directory. Example: Login page sends a... (3 Replies)
Discussion started by: ravi18s
3 Replies

5. Web Development

Call shell script from HTML page - without web server

Hi, I have html page in my unix machine(server), which I will open with firefox or mozilla available in unix machine. Firefox or mozilla will be opened using x windows. Since I have access to unix machien(like other users) and this HTML page is for user having access to Unix machine, I see no... (7 Replies)
Discussion started by: vamanu9
7 Replies

6. HP-UX

Help running a unix script from a web page

First, let me state that I am completely out of my realm with this. I have a server running HPUX. I'm not even sure if this can be considered a UNIX question and for that let me apologize in advance. I need to create a web page where a client can input 2 variables (i.e. date and phone number).... (0 Replies)
Discussion started by: grinds
0 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

Dynamic checkbox(HTML page) for each process using shell script

Hi friends, I m newbie to bash scripting , i m writing script(bash) that will display all processes which r running in my system in an html page, everything going fine but i m not able to get checkbox dynamically for each process in html page ,so that i can mark that process... (2 Replies)
Discussion started by: vagga06
2 Replies

9. Shell Programming and Scripting

Monitoring an html web page changes

Hello, I need to monitor an html web page for ANY changes and should be able to know if it's modified or not (since last query). I do not need what modifications but just notification is enough. This is a simple web page and I don't need to parse the links any further. Is it possible to do... (10 Replies)
Discussion started by: prvnrk
10 Replies

10. 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
echo(1B)					     SunOS/BSD Compatibility Package Commands						  echo(1B)

NAME
echo - echo arguments to standard output SYNOPSIS
/usr/ucb/echo [-n] [argument] DESCRIPTION
echo writes its arguments, separated by BLANKs and terminated by a NEWLINE, to the standard output. echo is useful for producing diagnostics in command files and for sending known data into a pipe, and for displaying the contents of envi- ronment variables. For example, you can use echo to determine how many subdirectories below the root directory (/) is your current directory, as follows: o echo your current-working-directory's full pathname o pipe the output through tr to translate the path's embedded slash-characters into space-characters o pipe that output through wc -w for a count of the names in your path. example% /usr/bin/echo "echo $PWD | tr '/' ' ' | wc -w" See tr(1) and wc(1) for their functionality. The shells csh(1), ksh(1), and sh(1), each have an echo built-in command, which, by default, will have precedence, and will be invoked if the user calls echo without a full pathname. /usr/ucb/echo and csh's echo() have an -n option, but do not understand back-slashed escape characters. sh's echo(), ksh's echo(), and /usr/bin/echo, on the other hand, understand the black-slashed escape characters, and ksh's echo() also understands a as the audible bell character; however, these commands do not have an -n option. OPTIONS
-n Do not add the NEWLINE to the output. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), echo(1), ksh(1), sh(1), tr(1), wc(1), attributes(5) NOTES
The -n option is a transition aid for BSD applications, and may not be supported in future releases. SunOS 5.10 3 Aug 1994 echo(1B)
All times are GMT -4. The time now is 06:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy