Need help to convert Flat file to HTML


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need help to convert Flat file to HTML
# 8  
Old 12-19-2006
while use -v option with awk it is also giving err to me also

try to use nawk in place of awk
# 9  
Old 12-19-2006
awk: syntax error near line 1
awk: bailing out near line 1
# 10  
Old 12-19-2006
Replace awk by nawk in the above script
# 11  
Old 12-19-2006
it is not working .Please give me soultions ,it is not homework. I have to craete webpage for different logs in my company eroom.
# 12  
Old 12-20-2006
Check in your system what version of awk do you have and replace awk by that version in the code

or

use this

Code:
sed "s/\t/ /g;s/^/<tr>/;s/$/<\/tr>/" file | sed "s/\([^ ]*\)/<td>\1<\/td>\\
/g" | sed "1 i\\
<table border=5 bordercolor=\"red\" width=10 bgcolor=\"black\">
$ a\\
</table>"

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Convert content of file to HTML

Hi I have file like this: jack black 104 daniel nick 75 lily harm 2 albert 5 and need to convert it into the html table like this: NO.......name....family..... id 1...........jack.....black.....104 2..........daniel....nick.......75 3..........albert.................5 i mean... (5 Replies)
Discussion started by: indeed_1
5 Replies

2. UNIX for Dummies Questions & Answers

Convert flat file to csv

Hi I have a file like this: a=1 b=2 c=3 a=4 b=2 d=3 a=3 c=4 How can I change this to csv format a,b,c,d 1,2,3,, 4,2,,3 3,,4,, Please use code tags next time for your code and data. Thanks (10 Replies)
Discussion started by: sandip_2014
10 Replies

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

4. Shell Programming and Scripting

Script to convert CSV file to HTML

Hi, I have made a a script which creates a csv file as daily database report However i want to covert that csv file to html because csv file does not have a good visibilty. So it is possible to have such csv to html coversion script. Your prompt help much appreciated. Thanks in advance (4 Replies)
Discussion started by: sv0081493
4 Replies

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

6. UNIX for Dummies Questions & Answers

convert csv to html file

Hi All, I am new to this forum,not sure where to post this query...so posted here Kindly need any of your help on the below ------------ I am using shell scripting and trying to convert a csv file to html file... example.csv --------------- Name Country Age Sex Andy India 25 ... (4 Replies)
Discussion started by: sumithra
4 Replies

7. Shell Programming and Scripting

Convert case on specified position of flat file

Please help Need a script which will do the following : Search on fixed width file , go to position (25,2) which means 25th and 26th position, Find if there are any char in lower case: For example 25,2 can be (9T) or (9w) or (Ww) or (wW)....The two positions can be numeric or alpha...no... (13 Replies)
Discussion started by: ssantoshss
13 Replies

8. Shell Programming and Scripting

how to convert a html file to an .xml one

Hii every one. I have lots of .html files like: <html> <title> </title> <head> </head> <body> <ul id="SummaryRatings">4 stars </ul> <ul id="summaryList"> <p><b> Aurhor</b> </p> <p>wsfwfrfrtgretryetyrtyty</p> </ul> ...... ....... </body> </html> (6 Replies)
Discussion started by: kheyali Mitra
6 Replies

9. Shell Programming and Scripting

Awk to convert a flat file to CSV file

Hi , I have a file with contents as below: Contract Cancellation Report UARCNCL LOS CODE DATE REAS TYPE AMOUNT AMOUNT LETTER BY ========= ======= ==== ==== ==== ========= ==== ==== 8174739 7641509 1S NONE CRCD 30-JUN-2008 NPAR N .00 .00 CCAN 8678696 8091709 1S NONE DDEB 30-JUN-2008... (14 Replies)
Discussion started by: rkumudha
14 Replies

10. UNIX for Dummies Questions & Answers

Flat File to HTML

Is there a Unix product or command that can convert a flat file to an hTML document? (2 Replies)
Discussion started by: randerson
2 Replies
Login or Register to Ask a Question