Having problem with how to use HTML in Unix shell scripting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Having problem with how to use HTML in Unix shell scripting
# 1  
Old 05-08-2012
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 I'm interested is the first line, which i woud save in some sample.txt

so my sample.txt file would be.
more sample.txt
ACS acscsa01 up up up up up

Having the desired details in the file, Will take each filed from the file
FILED1=ACS
FILED2=acssca01 etc..

And the same would be done for the other 40 servers acssca01-40.



Once i have that i want to send the data through mail in the tabular format as below.
==========================================================
SEGMENT| SERVER PORT1 PORT2 PORT3 PORT4 PORT5
==========================================================
ACS acscsa01 UP UP UP UP UP
==========================================================
FCS acscsa02 UP UP UP UP UP
==========================================================
XCS acscsa03 UP UP UP UP UP


I'm able to get the desired output with out the tabular structure. But, wnat to learn how this to be done.

Would really appreciate if you can refer to link or book for using the html in unix.


Appreciate your response.

---------- Post updated at 01:22 PM ---------- Previous update was at 01:02 PM ----------

Appreciate quick response.
# 2  
Old 05-08-2012

What have you tried so far?

Which part are you having problems with?

What does HTML have to do with it?
# 3  
Old 05-09-2012
Hi Johnson,

I have tried to get the desired output and I'm able to get that in mail, which looks as below.

SEGMENT| SERVER PORT1 PORT2 PORT3 PORT4 PORT5

ACS acscsa01 UP UP UP UP UP
FCS acscsa02 UP UP UP UP UP
XCS acscsa03 UP UP UP UP UP

But, I'm looking for an better formatted output, which i would to be in an tabular format.

I have absolutely no idea n how to use HTML in Unix scripting,I'm thinking that HTLM would the needful.

Bottom line is, want the output in tabular format.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

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

2. UNIX for Advanced & Expert Users

How to use HTML in UNIX Bash Scripting?

I am planning to run an automation , Could anyone try to help me to how to write an html in unix scripting so when I try to send email it should work especially with Bold and colors (6 Replies)
Discussion started by: cassia
6 Replies

3. UNIX for Advanced & Expert Users

Do we have any bulletins for HTML in UNIX scripting

I have tried only 4 types of bulletins in Html using unix circle, square,disc,li Do we have any other than these in unix? (2 Replies)
Discussion started by: cassia
2 Replies

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

5. UNIX for Dummies Questions & Answers

Unix Shell Scripting( Calling from Unix to PLSQL)

Hello Experts, I have the following questions to be discussed here at this esteemed discussion forum. I have two Excel sheets which contain Unix Commands llike creating directory the structure/ftp/Copy/Zip etc to basically create an environment. I need help in understanding some of... (1 Reply)
Discussion started by: faizsaadq
1 Replies

6. Shell Programming and Scripting

Shell scripting and ls -1 problem

Hey, I'm running knoppix and I'm trying to run a shell script to change multiple lines of text in multiple files #!/bin/sh for i in 'ls-1 test' do sed 's/bob/manny/'g $i > $i.0 mv $i.0 $i done Obviously this isn't the original file, but it's on another non-networked machine. What... (7 Replies)
Discussion started by: afroCluster
7 Replies

7. Shell Programming and Scripting

how to use html tag in shell scripting

Hai friends I have a small doubt.. how can we use html tag in shell scripting code : echo "<html>" echo "<body>" echo " welcome to peace world " echo "</body>" echo "</html>" output displayed like this: <html> <body> welcome to peace world </body> </html> (5 Replies)
Discussion started by: jrex1983
5 Replies

8. UNIX for Dummies Questions & Answers

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... (3 Replies)
Discussion started by: ronix007
3 Replies

9. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
Login or Register to Ask a Question