Shell command output into HTML


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell command output into HTML
# 8  
Old 12-31-2012
you can try this:

Code:
sendmail -t <<EOF
Content-type: text/html
TO: $mailaddress
CC: $mailccaddress
FROM: kashyap@xxx.com
SUBJECT: My html email
IMPORTANCE: High
$(sed 's/--*[$-]/\n/g' file  | awk -F'|' 'BEGIN{print "<html>\n<table border="3" cellspacing="1" cellpadding="2">"} {print "<tr>";for(i=1;i<=NF;i++)print "<td>" $i"</td>";p
rint "</tr>"} END{print "</table>\n</html>"}' | sed 's/\(URL:[^ ]*\)/<a href=\1>THE LINK<\/a>/g')
EOF

This User Gave Thanks to sathyaonnuix For This Post:
# 9  
Old 01-01-2013
HI,
First of all happy new year.
Yes i got the required output.
Thanks for the help.
I don know to close the thread will you please do it for me,
Thanks,
Kashyap
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Arranging the command output into an html table format

Hi, I need to format a command output for the beolow command: runmqckm -cert -list -db $MQ_KDB -pw $PASSWD -expiry $EXP | grep -v "Certificates in database" The output will be: "ABC - cert name" From: Tuesday, May 25, 1999 11:09:40 AM CDT To: Saturday, May 25, 2019 11:39:40 AM CDT ... (3 Replies)
Discussion started by: bdpl
3 Replies

2. Shell Programming and Scripting

Convert shell script output txt file to html table

My concnern related to the post -Convert shell script output txt file to html table, in this how to print the heading as color. awk 'BEGIN{print "<table>"} {print "<tr>";for(i=1;i<=NF;i++)print "<td>" $i"</td>";print "</tr>"} END{print "</table>"}' <filename> (8 Replies)
Discussion started by: sarajobmai
8 Replies

3. Shell Programming and Scripting

[Solved] Shell script output in HTML or with table like results and mail

Hello, Currently i have a script which will disply the results in plain text format. I want to format the result in more readable format like Making bold headings and format with colors etc. Something like html and send that content as email. Please help me how i can do that. I am using... (10 Replies)
Discussion started by: joy lobo
10 Replies

4. Web Development

Get command-output to webpage from solaris-10-OS invoked from html webpages

Hello, I am a middleware administrator and as an admin I need to monitor a number of middleware instances (weblogic servers). But since it is a not the forum for that i would like to put my problem in simple terms and need guidance on that. I need to use apache webserver on Solaris 10 zones to... (3 Replies)
Discussion started by: poga
3 Replies

5. Shell Programming and Scripting

Convert shell script output txt file to html table

Hi, I have script which generates the output as below: Jobname Date Time Status abc 12/9/11 17:00 Completed xyz 13/9/11 21:00 Running I have the output as a text file. I need to convert it into a HTML Table and sent it thru email ... (6 Replies)
Discussion started by: a12ka4
6 Replies

6. Shell Programming and Scripting

shell script output in HTML or with table like results

Hello, Currently i have a ksh script which will disply the results in plain text format. I want to format the result in more readable format like Making bold headings and format with colors etc. Something like html or excel format and send that content as email. Please help me how i can do... (2 Replies)
Discussion started by: kotasateesh
2 Replies

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

8. Programming

How to read output of a shell command

Hello All, I have a an application written in C and runing on Red Hat Linux. In my code I have written a command that is fired on the linux shell by using system() function call. Now I need to read the output of this command in my c program and assign it to a variable. Can anyone... (1 Reply)
Discussion started by: shamik
1 Replies

9. Shell Programming and Scripting

have a shell script done in pl/sql and want output in html

I have this shell script where I have both pl/sql and sql. But want to have a snigle output file where the result of each cursors are in HTML tables. I was able to do that on my old script but it was only sql scripts (no pl/sql). Can I do have such outputs now with my new script where I... (2 Replies)
Discussion started by: arobert
2 Replies

10. Shell Programming and Scripting

to print output using shell command

suppose u have 2 files ; where both files have one line in common. say one file like that >gi|62859953|ref|NP_001017322.1| plexin B2 MKEKERTKAITEIYLTRLLSVKGTLQQFVDNFFQSVLNSNQVVPPAVKYFFDFLDEQAEKYEIKDEDTVHIWKTNSLSLR... (13 Replies)
Discussion started by: cdfd123
13 Replies
Login or Register to Ask a Question