Conversion of a text file to html


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Conversion of a text file to html
# 1  
Old 06-06-2014
Conversion of a text file to html

hi i hav a file called focus. which is the output file. i want to convert this file to html file and mail it. help with code and explanatio. i am basic in unix
# 2  
Old 06-06-2014
Hi, welcome to these forums...

Please show a representative sample of input, desired output, attempts at a solution and specify what OS and versions are being used
# 3  
Old 06-06-2014
fr ex : my output is

No of files : 1
No of folder : 2
No of system : 3

want to convert this into html file with tables and colours.
condition is html file must br mail.

---------- Post updated at 02:00 AM ---------- Previous update was at 02:00 AM ----------

can anyone help?
# 4  
Old 06-06-2014
Still not clear.

Please post sample input and expected output.
# 5  
Old 06-07-2014
this is my file.

=============
No of file : 1
No of Folder : 2
No of Checks : 3
===============

This is how my output file looks. its a text file. i want to mail this output file in html format..

i should receive a mail as a table with those information in outputfile.
# 6  
Old 06-10-2014
Is it just text you want to display? How about something like
Code:
<html><head><title>My Converted Text</title></head><body>

in front of your text and
Code:
</body></html>

after?

If you want to control how it looks, you can put a <pre> right after you start the body and a </pre> after your text and before you close the body.

HTH
This User Gave Thanks to wbport For This Post:
# 7  
Old 06-11-2014
Code:
<html>
<head>
<title>My Converted Text</title>
</head>
<body>
<pre>
cat focus
</pre>
</body>
</html>


Is this correct?? the text is in the file called focus. i am trying to import text from the focus..

Last edited by Scrutinizer; 06-11-2014 at 04:57 AM.. Reason: CODE tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Format text file to html

Hi Experts, Anybody out there figure out on how to achieve in shell scripts or tools. I have done googling to find solutions but no luck. I have thousands of .txt files to batch process, please see the below sample text content after -------- start here --------. What I want to achieve is to... (10 Replies)
Discussion started by: lxdorney
10 Replies

2. Shell Programming and Scripting

HTML Conversion of text file

Hi, I have following text file. I want to convert it into the below HTML format. Kindly help. Input Text File Header 1 ======= Name:*** Age:*** Address:*** Work Phone:*** Email:*** Mobile:*** Country:*** City:*** Pincode:*** some text here **** (10 Replies)
Discussion started by: ctrld
10 Replies

3. Shell Programming and Scripting

html to csv conversion

thanks for allowing me to join your forum i have a html file with three columns ------------Last visit date , URL and link,,,,,,,, how can i convert the same into csv so that i can output into database... the mechine is linux...i made a little googling and got idea that there is ways for... (2 Replies)
Discussion started by: certteam
2 Replies

4. Shell Programming and Scripting

Conversion of spaces Text file into CSV format file

Input file (each line is separaed by spaces )given below: Name Domain Contact Phone Email Location ----------------------- ------------------------------------------------ ------- -----... (18 Replies)
Discussion started by: sreenath1037
18 Replies

5. Shell Programming and Scripting

shell or perl script needed for ldif file to text file conversion

This is the ldf file dn: sdcsmsisdn=1000000049,sdcsDatabase=subscriberCache,dc=example,dc=com objectClass: sdcsSubscriber objectClass: top postalCode: 29600 sdcsServiceLevel: 10 sdcsCustomerType: 14 givenName: Adelia sdcsBlackListAll: FALSE sdcsOwnerType: T-Mobile sn: Actionteam... (1 Reply)
Discussion started by: LinuxFriend
1 Replies

6. Shell Programming and Scripting

outputting a text file in html

is there anyway i can paste/cat a text file into a html paragraph <p> function html_header { cat <<END <html> <head><title>${1}</title></head> <body> <p> ${2} </p> END } function html_footer { cat <<END </body> </html> END (2 Replies)
Discussion started by: magnia
2 Replies

7. Shell Programming and Scripting

Converting a text file to HTML

Hi, I need to convert a text file formatted like this ("tshark -z conv,ip" output) to HTML: ===================================================================================================== IPv4 Conversations Filter:<No Filter> | <- ... (4 Replies)
Discussion started by: ph0enix
4 Replies

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

9. UNIX for Dummies Questions & Answers

Binary data to text file conversion

Dear Sir; i want to know how the binary data convert to text file or readablw format (ASCII).If possible pl. help me for the software and where it is available for download. i.e. (1 Reply)
Discussion started by: auro123
1 Replies

10. UNIX for Dummies Questions & Answers

ISAM FILE CONVERSION TO TEXT

I am having a problem. There is one ISAM file available in SCO UNIX environment. I want to convert it to simple comma delimited text file. Actual problem is with the size of the file. For the time being, size is 1.3 GB and I have to grab the subset of the data after every five minutes e.g. in... (3 Replies)
Discussion started by: a.waqar
3 Replies
Login or Register to Ask a Question