Sponsored Content
Top Forums Shell Programming and Scripting Converting a text file to HTML Post 302252420 by ph0enix on Wednesday 29th of October 2008 11:13:31 AM
Old 10-29-2008
Converting a text file to HTML

Hi,
I need to convert a text file formatted like this ("tshark -z conv,ip" output) to HTML:

Code:
=====================================================================================================
IPv4 Conversations
Filter:<No Filter>
                                               |       <-      | |       ->      | |     Total     |
                                               | Frames  Bytes | | Frames  Bytes | | Frames  Bytes |
192.168.1.246      <-> 192.168.1.135            2       276       1        60       3       336
192.168.1.255      <-> 192.168.1.167            2       184       0         0       2       184
192.168.1.255      <-> 192.168.1.99             1       265       0         0       1       265
192.168.1.255      <-> 192.168.1.164            1       126       0         0       1       126
10.0.0.255      <-> 10.0.0.250            1       126       0         0       1       126
192.168.1.255      <-> 192.168.1.41             1        92       0         0       1        92
=====================================================================================================

Preferably the rows and the columns would be in a table so the data is nicely aligned. Are there any tools that would allow me to do this from a script? ...or do I need to use sed/awk? If so, how?

Thank you! Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Converting HTML to CSV

Hi, I need to convert a relatively large html file (1.5megs) into CSV under Unix. How would I be able to do this? Much thanks. (3 Replies)
Discussion started by: Jexel
3 Replies

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

3. Shell Programming and Scripting

Sybase Interface file and converting in text format.

Does anyone knows how to decode the address in interface file using shell , i have done it using perl but can it be done in shell. master tli tcp /dev/tcp \x00021004ac1414230000000000000000 query tli tcp /dev/tcp \x00021004ac1414230000000000000000 (0 Replies)
Discussion started by: dinjo_jo
0 Replies

4. Shell Programming and Scripting

Converting columns of a text file.

Not sure the most effient way to do this. I have figiured out how to extract columns with shell script, but not sure how to convert This is what I have... NEWDNS 04-Jun-2011 06:00:59.762 10.220.136.217 crl.verisign.com This is what I need.... Change date, remove mil seconds,... (1 Reply)
Discussion started by: mrlayance
1 Replies

5. UNIX for Dummies Questions & Answers

Converting a text file with irregular spacing into a space delimited text file?

I have a text file with irregular spacing between values which makes it really difficult to manipulate. Is there an easy way to convert it into a space delimited text file so that all the spaces, double spaces, triple spaces, tabs between numbers are converted into spaces. The file looks like this:... (5 Replies)
Discussion started by: evelibertine
5 Replies

6. Shell Programming and Scripting

Converting text file in a matrix

Hi All, I do have a file with many lines (rows) and it is space delimited. For example: I have a file named SR345_pl.txt. If I open it in an editor, it looks like this: adfr A2 0.9345 dtgr/2 A2 0.876 fgh/3 A2 023.76 fghe/4 A2 2345 bnhy/1 A3 3456 bhy A3 0.9876 phy A5 0.987 kdrt A5... (9 Replies)
Discussion started by: Lucky Ali
9 Replies

7. Shell Programming and Scripting

Format problem while converting text file to csv

Hi , I need a help in following scenario.I tried searching in google but couldn't able to find the exact answer. Sorry if i am re-posting already answered query. While i am trying to convert into log file into csv i couldn't able to get the format which i am looking for. I converted file... (4 Replies)
Discussion started by: varmas424
4 Replies

8. Shell Programming and Scripting

Converting data for text file to csv

Gents Using the script attached (raw2csv). i use to create the file .csv.. The input file is called 201.raw. Kindly can you check if there is easy way to do it. The script works fine but takes a lot time to process Thanks for your help (8 Replies)
Discussion started by: jiam912
8 Replies

9. Shell Programming and Scripting

Converting csv to html format

Below is the code I have - How can I convert the data in the csv into 3 tables in html. instead of 1 table. Attached is the format I am getting. (1 Reply)
Discussion started by: archana25
1 Replies

10. UNIX for Beginners Questions & Answers

Converting text file to html page

Hello Everyone, I have the following text file with the each field separated by newline Text file P file1-en-us_US-20170718T150157Z.json Wed 19 Jul 2017 06:10:13 AM EDT P file2-en-us_US-20170718T160150Z.json Wed 19 Jul 2017 06:10:13 AM EDT P file3-en-us_US-20170718T163218Z.json Wed... (9 Replies)
Discussion started by: nextStep
9 Replies
NOS-TUN(8)						    BSD System Manager's Manual 						NOS-TUN(8)

NAME
nos-tun -- implement ``nos'' or ``ka9q'' style IP over IP tunnel SYNOPSIS
nos-tun -t tunnel -s source -d destination -p protocol_number [source] target DESCRIPTION
The nos-tun utility is used to establish an nos style tunnel, (also known as ka9q or IP-IP tunnel) using a tun(4) kernel interface. Tunnel is the name of the tunnel device /dev/tun0 for example. Source and destination are the addresses used on the tunnel device. If you configure the tunnel against a cisco router, use a netmask of ``255.255.255.252'' on the cisco. This is because the tunnel is a point-to-point interface in the FreeBSD end, a concept cisco does not really implement. Protocol number sets tunnel mode. Original KA9Q NOS uses 94 but many people use 4 on the worldwide backbone of ampr.org. Target is the address of the remote tunnel device, this must match the source address set on the remote end. EXAMPLES
This end, a FreeBSD box on address 192.168.59.34: nos-tun -t /dev/tun0 -s 192.168.61.1 -d 192.168.61.2 192.168.56.45 Remote cisco on address 192.168.56.45: interface tunnel 0 ip address 192.168.61.2 255.255.255.252 tunnel mode nos tunnel destination 192.168.59.34 tunnel source 192.168.56.45 AUTHORS
Nickolay N. Dudorov <nnd@itfs.nsk.su> wrote the program, Poul-Henning Kamp <phk@FreeBSD.org> wrote the man-page. Isao SEKI <iseki@gongon.com> added a new flag, IP protocol number. BUGS
We do not allow for setting our source address for multihomed machines. BSD
April 11, 1998 BSD
All times are GMT -4. The time now is 02:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy