Sponsored Content
Top Forums Shell Programming and Scripting Convert shell script output txt file to html table Post 302980465 by sarajobmai on Sunday 28th of August 2016 01:09:32 PM
Old 08-28-2016
i tried with above code but it is not display the heading as color. no luck.
Code:
awk 'BEGIN{print "<table border=1 width=100% cellspacing=0 cellpadding=0 align=center>"}{c="td"; e=""}FNR==1{c="th";e=" style=\"color=red;\""}{print "<tr>";for(i=1;i<=NF;i++)printf("<%s%s>%s</%s>\n",c,e,$i,c); print "</tr>"} END{print "</table>"}' mail_send.txt

can you please suggest me to fix this.


Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 08-28-2016 at 02:48 PM.. Reason: Added CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Format txt file as html table

I have a short time to solve a problem, so I need some help. I've searched the forum, but I couldn't find a solution to my problem. I made a script to filter some text and now I have a new requirement to make it available as html table. Problem is that I more than one files with different set... (2 Replies)
Discussion started by: tetreb
2 Replies

2. Shell Programming and Scripting

Is it possible to convert text file to html table using perl

Hi, I have a text file say file1 having data like ABC c:/hm/new1 Dir DEF d:/ner/d sd ...... So i want to make a table from this text file, is it possible to do it using perl. Thanks in advance Sarbjit (1 Reply)
Discussion started by: sarbjit
1 Replies

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

4. Shell Programming and Scripting

Bash shell script that inserts a text data file into an HTML table

hi , i need to create a bash shell script that insert a text data file into an html made table, this table output has to mailed.I am new to shell scripting and have a very minimum idea of shell scripting. please help. (9 Replies)
Discussion started by: intern123
9 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. UNIX for Dummies Questions & Answers

How to Update DB table from txt file using CRONJOB in Unix Shell Script

Hi Experts, can guide how we can Update a Database Table using a txt file source Using Unix Shell Scripts. What are the Cron Jobs codes can written to Update DB table. txt file contains record like data. US 09/03/2012 User DocType DocID. these above feilds in txt files need to be updated in... (4 Replies)
Discussion started by: mahesh.sap
4 Replies

7. Shell Programming and Scripting

Need to convert output.txt into html file

I have output.txt file generated through shell scripts which need convert in tabular format using html can you please help me output.txt Token State Date1 Date2 Description Name 34567 open 27/06/13 28/06/13 ... (5 Replies)
Discussion started by: vijay_rajni
5 Replies

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

9. UNIX for Dummies Questions & Answers

Convert Txt file to HTML table and email

Hi all I need help converting a text file into a html table in bash and I need to email this table. The text file looks like the below. Two columns with multiple rows. Top row being header. Application Name Application Status Application 1 Open Application 2 ... (2 Replies)
Discussion started by: hitmanjd
2 Replies

10. Shell Programming and Scripting

Awk, sed, shell all words in INPUT.txt find in column1 of TABLE.txt and replce with column2 in

Hi dears i have text file like this: INPUT.txt 001_1_173 j nuh ]az 001_1_174 j ]esma. nuh ]/.xori . . . and have another text like this TABLE.txt j j nuh word1... (6 Replies)
Discussion started by: alii
6 Replies
Geo::GoogleEarth::Pluggable::Style(3pm) 		User Contributed Perl Documentation		   Geo::GoogleEarth::Pluggable::Style(3pm)

NAME
Geo::GoogleEarth::Pluggable::Style - Geo::GoogleEarth::Pluggable Style Object SYNOPSIS
use Geo::GoogleEarth::Pluggable; my $document=Geo::GoogleEarth::Pluggable->new(); my $style=$document->Style(); DESCRIPTION
Geo::GoogleEarth::Pluggable::Style is a Geo::GoogleEarth::Pluggable::Base with a few other methods. USAGE
my $style=$document->Style(id=>"Style_Internal_HREF", iconHref=>"http://.../path/image.png"); CONSTRUCTOR
new my $style=$document->Style(id=>"Style_Internal_HREF", iconHref=>"http://.../path/image.png"); METHODS
type Returns the object type. my $type=$style->type; node color Returns a color code for use in the XML structure given many different inputs. my $color=$style->color("FFFFFFFF"); #AABBGGRR in hex my $color=$style->color({color="FFFFFFFF"}); my $color=$style->color({red=>255, green=>255, blue=>255, alpha=>255}); my $color=$style->color({rgb=>[255,255,255], alpha=>255}); my $color=$style->color({abgr=>[255,255,255,255]}); #my $color=$style->color({name=>"blue", alpha=>255}); #TODO with ColorNames Note: alpha can be 0-255 or "0%"-"100%" BUGS
Please log on RT and send to the geo-perl email list. SUPPORT
Try geo-perl email list. AUTHOR
Michael R. Davis (mrdvt92) CPAN ID: MRDVT COPYRIGHT
This program is free software licensed under the... The BSD License The full text of the license can be found in the LICENSE file included with this module. SEE ALSO
Geo::GoogleEarth::Pluggable creates a GoogleEarth Document. perl v5.14.2 2010-01-22 Geo::GoogleEarth::Pluggable::Style(3pm)
All times are GMT -4. The time now is 06:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy