Config to html


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Config to html
# 1  
Old 11-01-2002
Config to html

Hi,
Does anybody know of a system utility or a script that is used on IRIX(SGI) server to print out the configuration and information of the system in html format.

Please let me know if you do
thanks in advance
# 2  
Old 11-11-2002
You can dump the information to text files and then collect them on your server - write a script to format them for html (mostly using a <pre> ).

Here is a partial example (written in sh for HP servers):
Code:
# DF GENERATION
        TMP_FILENAME="$TMPDIR/$DIR/df.tmp"
        rsh ${TARGET_HOST} '/usr/bin/bdf -t hfs' 2>/dev/null > $TMP_FILENAME
        if [ -s $TMP_FILENAME ]; then
                FILENAME="$TMPDIR/$DIR/df.html"
                cat << EOF > $FILENAME
<HTML>
<TITLE>${TARGET_HOST}</TITLE>
<BODY BGCOLOR="$BACKGROUND_COLOR">
<FONT SIZE="$FONT_SIZE">
<PRE>
<B><FONT SIZE="$TITLE_SIZE">$TARGET_HOST</FONT></B>
<FONT SIZE="0" FACE="arial">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var m = "Updated: " + document.lastModified;
var p = m.length;
document.write(m.substring(p, 0));
// End -->
</SCRIPT>
<FONT SIZE="$FONT_SIZE">
EOF
echo "<br><br>" >> $FILENAME
echo "HFS Filesystems:" >> $FILENAME
echo "<br><br>" >> $FILENAME
        rsh ${TARGET_HOST} '/usr/bin/bdf -t hfs' \
            2>/dev/null >> $FILENAME
echo "<br><br>" >> $FILENAME
echo "VxFS Filesystems:" >> $FILENAME
echo "<br><br>" >> $FILENAME
        rsh ${TARGET_HOST} '/usr/bin/bdf -t vxfs' \
            2>/dev/null >> $FILENAME
echo "<br><br>" >> $FILENAME
echo "TmpFS Filesystems:" >> $FILENAME
echo "<br><br>" >> $FILENAME
        rsh ${TARGET_HOST} '/usr/bin/bdf -t tmpfs' \
            2>/dev/null >> $FILENAME

                cat << EOF >> $FILENAME
</PRE>
</BODY>
</HTML>
EOF
                cp $FILENAME $ROOT/$DIR
                /usr/bin/rm $TMP_FILENAME
        fi
#

Note to RTM: I added a [/code]tag at the end of your code directive ......
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Apache virtual host config vs global config problem

Hi folks, I am trying to configure Apache webserver and also a virtual host inside this webserver. For Global server config: /var/www/html/index.html For virtual host config: /var/www/virtual/index.html Both client10 & www10 are pointing to 192.168.122.10 IP address. BUT, MY... (1 Reply)
Discussion started by: freebird8z
1 Replies

2. UNIX for Advanced & Expert Users

Mutt for html body and multiple html & pdf attachments

Hi all: Been racking my brain on this for the last couple of days and what has been most frustrating is that this is the last piece I need to complete a project. There are numerous posts discussing mutt in this forum and others but I have been unable to find similar issues. Running with... (1 Reply)
Discussion started by: raggmopp
1 Replies

3. Shell Programming and Scripting

Removing all except couple of html tags from html file

I tried to find elegant (or at least simple) way to remove all but couple of html tags from html file, but all examples I found dealt with removing all the tags. The logic of the script would be: - if there is <li> or <ul> on the line, do nothing (=write same line to output) - if there is:... (0 Replies)
Discussion started by: juubuntu
0 Replies

4. UNIX for Dummies Questions & Answers

Sending html email with html attachment

Hello, I have a script which is sending an html file as an attachment. #!/usr/bin/ksh export MAILTO="user@company.com" export CONTENT="/usr/tmp/file.html" export SUBJECT="EmailSubject" ( echo "Subject: $SUBJECT" echo "MIME-Version: 1.0" echo "Content-Type: text/html" echo... (0 Replies)
Discussion started by: sreenathkg
0 Replies

5. Shell Programming and Scripting

Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report

Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated. script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made. OS :Susi linux ver 10.3. ... (4 Replies)
Discussion started by: muraliinfy04
4 Replies

6. Red Hat

Send HTML body and HTML attachment using MUTT command

Hi there.. I need a proper "mutt" command to send a mail with html body and html attachment at a time. Also if possible let me know the other commands to do this task. Please help me.. (2 Replies)
Discussion started by: vickramshetty
2 Replies

7. Shell Programming and Scripting

parsing config file to create new config files

Hi, I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below. I will be using the config file as mentioned below: (config.txt) country:a,b city:1,2 type:b1... (1 Reply)
Discussion started by: clazzic
1 Replies

8. UNIX for Advanced & Expert Users

shellinabox/html help to insert a keypress with an html button

I am trying to use shellinabox as a terminal emulator. Everything is working except there seems to be no way to simulate an F14 button press in shellinabox. I am already embedding shellinabox in an html page so Im am wondering if there is a way to make an html/js button that will pass F14 to the... (0 Replies)
Discussion started by: syadnom
0 Replies

9. Shell Programming and Scripting

Sendmail with html attachment and html body

Hi folks, I have a perl script which sends out email after successful completion of job as inline html, I want to send it out as two parts now as html inline and html attachment. see the attached script. Thanks in advance (1 Reply)
Discussion started by: sol_nov
1 Replies

10. UNIX for Dummies Questions & Answers

How do I extract text only from html file without HTML tag

I have a html file called myfile. If I simply put "cat myfile.html" in UNIX, it shows all the html tags like <a href=r/26><img src="http://www>. But I want to extract only text part. Same problem happens in "type" command in MS-DOS. I know you can do it by opening it in Internet Explorer,... (4 Replies)
Discussion started by: los111
4 Replies
Login or Register to Ask a Question