Sponsored Content
Top Forums Shell Programming and Scripting Format txt file as html table Post 302355445 by tetreb on Tuesday 22nd of September 2009 06:04:46 PM
Old 09-22-2009
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 of data which would demand a dinamic number of rows for each file.

In example, for

project XYZ
filename filecode size remotecode remote filesize
abcd 1234 5248 5678 3567

I would have many files, each in a new row. Do you have a suggestion how to make it work? I have two ideas: one is to reformat the existing text file, other is to make a new filter which would add html tags on the fly.

Thanks for any help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

AWK CSV to TXT format, TXT file not in a correct column format

HI guys, I have created a script to read 1 column in a csv file and then place it in text file. However, when i checked out the text file, it is not in a column format... Example: CSV file contains name,age aa,11 bb,22 cc,33 After using awk to get first column TXT file... (1 Reply)
Discussion started by: mdap
1 Replies

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

3. UNIX and Linux Applications

Ssmtp -t < /path/to/the/message.txt (How to format message.txt for html email)

ssmtp has been running well under Kubuntu 12.04.1 for plain text messages. I would like to send html messages with ssmtp -t < /path/to/the/message.txt, but I cannot seem to get the message.txt file properly formatted. I have tried various charsets, Content-Transfer-Encoding, rearranging the... (0 Replies)
Discussion started by: Ronald B
0 Replies

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

5. Shell Programming and Scripting

Need help to format one txt file to required format

Hello Everyone, I have one source file which is genarated by SAP in different format(Which I've never seen). I need to convert that file to required format and I need to read this target file from Datastage to use this in my Jobs. So I do not have any other options except to use Unix script to... (4 Replies)
Discussion started by: Prathyu
4 Replies

6. UNIX for Dummies Questions & Answers

Extract table from an HTML file

I want to extract a table from an HTML file. the table starts with <table class="tableinfo" and ends with next closing table tag </table> how can I do this with awk/sed... ---------- Post updated at 04:34 PM ---------- Previous update was at 04:28 PM ---------- also I want to... (4 Replies)
Discussion started by: koutroul
4 Replies

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

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

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

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
GNUHTML2LATEX(1)					User Contributed Perl Documentation					  GNUHTML2LATEX(1)

NAME
gnuhtml2latex - html to latex converter SYNOPSIS
gnuhtml2latex [options] filename OPTIONS
-a [author] speecify document author -b Process more than one input HTML file (they all get concatenated and written to a single output file, or to STDOUT if -s is set) -c Use table of contents -f [string] Specify foonote -h [string] Specify header -i filename Get the list of files to be converted from the specified filename -m Allow the use of some tags that require entering and exiting math mode. Currently, the superscript and subscript tags are achieved by using the math mode. Now, using the math mode can break some formatting. Math mode will only be entered in the output document if you specify this switch. -n Use numbered sections -H use hyperref package to process anchors -g Include images. If wget is installed, it will be used in order to download the images; otherwise, their position will just be marked in the resulting TeX document. -o [string] Specify document style -p Break page after title / table of contents -P Partial / plain: Omit preamble and postamble. Note that -P makes -H and -o meaningless (as they act in the preamble) -S Skip (ignore) the specified comma-separated tags, along with all of their content. -s Write to STDOUT instead of to inputfilename.tex -t [title] Specify title of document DESCRIPTION
This aims to be replacement of html2latex. Program takes html file foo.html or foo.htm file and makes latex file foo.tex from it NOT VERY AMBITIOUS TODO
For people who want only functionality of original html2latex bugfixes - Im sure there is plenty of bugs inside clueful backslash escaping more entities from outside of iso-8895-1 tables performance boost and a lot more MORE AMBITIOUS TODO
For people who want a real tool make it part of some html processor FUTURE OF THIS PACKAGE
This is very possible that functions of this package will be included to some more general project. This package was made mainly to make world a bit more free. perl v5.14.2 2012-02-29 GNUHTML2LATEX(1)
All times are GMT -4. The time now is 09:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy