Sponsored Content
Top Forums Shell Programming and Scripting Display both html and plain text in email in shell script Post 302526370 by DGPickett on Tuesday 31st of May 2011 10:34:45 AM
Old 05-31-2011
When you <pre> you need to escape [<>'"&] like & to &amp;, which sed can do.
Code:
$ cat mysrc/txt2html
#!/usr/bin/sed -f
 
s/\&/&amp;/g
s/"/\&quot/g
s/>/\&gt;/g
s/</\&lt;/g
s/'/\&apos;/g
 
$

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

HTML display timing problem under ksh script

Using a HTML page , i'm running a Unix ksh script with <a href=..>. The script contains loop like this : for i in do rsh..... done each rsh command is running quite long and then i would display results in HTML format but about 5mn my blank page waiting for result is running in error... (1 Reply)
Discussion started by: Nicol
1 Replies

2. AIX

email from root sent my passord in plain text.

Root emailed me this message and thats ok it is supposed to. The thing that concerns me is that the ADMIN password came in plain text. I Xed it out for the purpose of this message of course. Is there a way for me to set this so the password comes encrypted? OR is not included at all in the... (4 Replies)
Discussion started by: rocker40
4 Replies

3. UNIX for Advanced & Expert Users

display HTML text in body using unix mailX ????

display HTML text in body using unix mailX ????Hello, could any one tell me how to display text in html layout by sending a file using mailx command in unix. i know to use mailx : mailx -s "SUBJECT" user.name@domail.com < file_name.txt instead of txt file i want to send html page and... (8 Replies)
Discussion started by: sparan_peddu
8 Replies

4. UNIX for Dummies Questions & Answers

Drag and drop items in plain html page

Hello, Am looking for a tool / open source framework that could do the following. A plain html page, with some toolbox at the border of the page where the tool box contains individual tool that represents operation like "extend fleet", "add drives", "backtrack" or something of that sort. ... (1 Reply)
Discussion started by: matrixmadhan
1 Replies

5. Shell Programming and Scripting

shell send html email

I know how to send an email with sendmail in a shell script. I know how to send an email with an attachment in a script. But im trying to send an email and need to set Content-Type to text/html and insert a file as the body and not attachment. Send email with file as attachment: ... (4 Replies)
Discussion started by: Ikon
4 Replies

6. Shell Programming and Scripting

Plain Text List to HTML List

Hello, I am trying to take a simple list (from echo, not a file) and turn it into a list with HTML codes. List item one. List item two. List item three. to <ol> <li>List item one.</li> <li>List item two.</li> <li>List item three.</li> </ol> The list is coming in via echo on... (4 Replies)
Discussion started by: QuestunAthority
4 Replies

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

8. Shell Programming and Scripting

how to send html email from shell script

This is my below script which is working fine as it send only plain text email. So My question is- How can I modify my below script to send this as an HTML formatted email? I want to show the text color of this expression `(echo "100*$TEST2/$TEST1" | bc -l)` as `RED` in an email and that can be... (3 Replies)
Discussion started by: raihan26
3 Replies

9. Shell Programming and Scripting

HTML code upload text file grep through shell script

I am looking for HTML code that browse text file and grep with database file then retrieve result txtfileuploaded contain 112233 115599 113366 shell code grep -F -f txtfileuploaded /data/database.txt result 112233 Mar 41$ 115599 Nov 44$ 113366 Oct 33$ attached... (2 Replies)
Discussion started by: phpshell
2 Replies

10. Shell Programming and Scripting

HTML table in email body using C Shell

I am using Sun Solaris ver. 5.10 and trying to send an HTML table in email body using mail command in C shell script. I tried following commands:- #1 mail -m "MIME-Version: 1.0;Content-type:text/html;charset=UTF-8" receiver@mail.com < file.html #2 mail -m "Content-type: text/html;" -s "This... (4 Replies)
Discussion started by: jnrohit2k
4 Replies
DWWW-TXT2HTML(8)						      Debian							  DWWW-TXT2HTML(8)

NAME
dwww-txt2html - simple txt to HTML converter for dwww SYNOPSIS
dwww-txt2html [--man] [--utf8] [file] DESCRIPTION
dwww-txt2html is part of the dwww package, which provides access to on-line documentation on a Debian system via WWW. dwww-txt2html is a very simple text to HTML filter, which reads text to convert from a file argument if was given or stdin otherwise. Con- verts `<', `>', and `&' properly. Adds <pre> and </pre> tags, but it does not add <html> or <body> tags. Handles backspace characters. Converts local man pages and documentation files references to anchors and adds links for both http and ftp sites, mail addresses or Debian `closes: #bug_no' statements (e.g. closes: #100000). dwww-txt2html is usually run by the dwww-convert(8) command. OPTIONS
--man Input is an uncompressed manual page. --utf8 Input is encoded in UTF-8. SEE ALSO
dwww(7), dwww-convert(8), dwww-cache(8). AUTHOR
Lars Wirzenius. Modified and improved by Robert Luberda. See dwww(7) for copyrights and stuff. dwww 1.11.1 February 15th, 2009 DWWW-TXT2HTML(8)
All times are GMT -4. The time now is 09:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy