Unix Shell Script along with .HTML


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Unix Shell Script along with .HTML
# 1  
Old 01-02-2008
Question Unix Shell Script along with .HTML

Hi,

I need to know how to interact the unix shell script along with a .html. For example, I have a code like:


#! /bin/sh

exit_err() {
print "Content-type: text/html\n"
print $1
exit
}

toolbin/gu -i -r 'm_who(user,group,role,name,addr,phone)' > /tmp/temp.txt --> "After this it's not coming down and gives error"

chmod 744 /tmp/temp.txt
tp=`cat /tmp/temp.txt | grep -i "Ronix007"`

echo "$tp" >> /tmp/error.txt

if [ $tp -ne "" ]
then
exit_err Error
else
./tool/mk_ht ./hi/prov.ihtml
fi



I have just given an example to make understood of the problem.This needs to work with GUI (In NetScape browser). Please let me know if you need anymore clarification regarding this issue.

Please suggest any solution for this soon. Thanks in Advance..
# 2  
Old 01-02-2008
Quote:
Originally Posted by ronix007
This needs to work with GUI (In NetScape browser).
NetScape - RIP.

Do you mean you want it as a CGI program and served by a webserver? If so find out what webserver you have and lookup how to install CGI programs.
# 3  
Old 01-03-2008
As nobody knows regarding this script and the servers, I am also not sure whether it supports CGI program or not. The web server is 'XG', which is a client specific webserver.

There are two seperate scripts which are working fine on this web servers, one contains the code as :

#! /bin/sh
./tool/mk_ht ./hi/prov.ihtml


and the other contains as :

#! /bin/sh
toolbin/gu -i -r 'm_who(user,group,role,name,addr,phone)' along with 'nawk' tool.


Seperately, both scripts are working fine, but if I will put some condition along with unix shell script, then it's giving error.

I need to join both the script along with unix commands as mentioned in the below example. Hope I am clear regarding this issue.
# 4  
Old 01-07-2008
Any solution for this issue ?? Please help !!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script Shell how's converting .html files

Hello everybody, :) I need some help with a school project that I have to create for the next week. :eek: So first, the aim of the Script is that I have a WebSite with a lot of .html / .shtml / .js / .css in one directory. That directory have few directory too but that's not so important,... (1 Reply)
Discussion started by: mariocrocop
1 Replies

2. HP-UX

Unable to send attachment with html tables in UNIX shell script

Heyy, any help would be grateful.... LOOKING FOR THE WAYS TO SEND AN EMAIL WITH ATTACHMENT & HTML TABLES IN BODY THROUGH SHELL SCRIPT (LINUX)..NOT SURE, IF WE HAVE ANY INBUILT HTML TAG OR UNIX COMMAND TO SEND THE ATTACHMENTS. KINDLY HELP below is small script posted for our understanding..... (2 Replies)
Discussion started by: Harsha Vardhan
2 Replies

3. Shell Programming and Scripting

Using HTML inside shell script

Hi, Am trying to use HTML tags inside my script but its not printing the required output. Any idea how to use html inside script will be helpful. #!/bin/ksh echo '<html>' echo '<font face='Calibri' size='3'> JobName Status</font>' echo '</html>' Output<html> <font ... (6 Replies)
Discussion started by: rogerben
6 Replies

4. UNIX for Dummies Questions & Answers

HTML parsing with UNIX shell script

Hi there, Infra/LEXUS0157/lexus0157.html-<tr><td>Minimum password age</td><td>3 days</td><td>Win2k8 Server</td></tr> How do I extract from this html with unix, I just need the 1.'Minimum password age' & 2. '3 days' parameter. Tried doing so with python, would like to have a better... (7 Replies)
Discussion started by: alvinoo
7 Replies

5. Shell Programming and Scripting

Help in using html in Shell script

Hi, I made a script that displays various fileds of report that are required in csv format and send it on mail(the csv file). Now I want to convert the csv format into html table and then send it on mail. Reports_Output.csv Code:... (6 Replies)
Discussion started by: Supriya Singh
6 Replies

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

7. Shell Programming and Scripting

Having problem with how to use HTML in Unix shell scripting

Hi All, I'm new to this forum. This is my first question. I'm trying to automate the status related information in our environment. So this is how the output would be. SEGMENT SERVER PORT1 PORT2 PORT3 PORT4 PORT5 ACS acscsa01 up up up up up All... (2 Replies)
Discussion started by: anand.aswini
2 Replies

8. Shell Programming and Scripting

SHELL SCRIPT AND HTML

Hello I'm trying to develop a shell script that executes commands such as cat / etc / fstab uname, etc. ..... which generates me an output file format html own way. Currently the shell script with the commands there, I have some notions of html but the generation of my html file is not clean at... (2 Replies)
Discussion started by: ddtseb
2 Replies

9. Shell Programming and Scripting

Converting Shell Script to HTML

Hi, Im new to shell scripting. My task is to convert shell script feed into html, so basically I have a lot of information in shell script and I want to convert it html. I know you can simply convert the information by hand, but is there any simpler way? Thank you Dave (3 Replies)
Discussion started by: davwel
3 Replies
Login or Register to Ask a Question