ASCII Text formatting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ASCII Text formatting
# 1  
Old 11-18-2008
ASCII Text formatting

Hi All,

I have a requirement to create a formatted text.
That is., I have a plain text composed to send it through an Email using mailx.
I need to change the formatting of the text like BOLD, ITALIC, UNDERINED, COLOURED, INDENT etc.,

First of all, is it possible in UNIX?
If yes, please let me know how to do that.

I may be crazy giving you the example, we have seen some of the text formatting available while you are sending scraps to your friends in orkut form.

I'm expecting something like that. May be its not soo easy to achieve in UNIX.

Please let me know is it possible in UNIX shell scripting.

FYI. I'm using KSH.

Regards
Mohan Kumar CS
# 2  
Old 11-18-2008
Yes its easy
you just have to wrap your text in htlm code

see
https://www.unix.com/unix-advanced-ex...#post302094339
# 3  
Old 11-18-2008
This will put the HTML formatted document /path/to/file/as/body as the body of them email.

Code:
( cat <<HERE /path/to/file/as/body ) | /usr/sbin/sendmail -oi -t
From: someone@somedomain.com
To: someoneelse@somedomain.com
Subject: Email Subject Here
Content-Type: text/html; charset=iso-8859-1;

HERE

# 4  
Old 04-25-2009
Thanks for the replies..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extended ASCII Characters keep on getting reintroduced to text files

I am working with a log file that I am trying to clean up by removing non-English ASCII characters. I am using Bash via Cygwin on Windows. Before I start I set: export LC_ALL=C I clean it up by removing all non-English ASCII characters with the following command; grep -v $''... (4 Replies)
Discussion started by: lewk
4 Replies

2. Homework & Coursework Questions

Convert ASCII Text, with CRLF

1. The problem statement, all variables and given/known data: write a script asciiFix.sh that takes an arbitrary number of file paths from the command line and carries out the same analysis on each one. If a file is not Windows ASCII, your script should do nothing to it. For each file that is... (7 Replies)
Discussion started by: kwatt019
7 Replies

3. Shell Programming and Scripting

Import ASCII 28 delimited text file

I have an ASCII 28 delimited text file(non-printable delimiter) with 4 columns along with the header.I need to open this text file in Excel or any other tool to view each column content. Please help.. Thanks (6 Replies)
Discussion started by: aneeta13
6 Replies

4. Shell Programming and Scripting

Binary to ASCII(TEXT converion)

Hi all, I have been trying to convert a binary file to TEXT/ASCII file in linux/solaries.and commands like string are no good.Also i am not sure how the how output of the file looks like... I am attaching the binary file as zip since i couldnt load it in its original form in the post incase... (1 Reply)
Discussion started by: pistachio
1 Replies

5. Programming

Reading a binary file in text or ASCII format

Hi All, Please suggest me how to read a binary file in text or ASCII format. thanks Nagendra (3 Replies)
Discussion started by: Nagendra
3 Replies

6. UNIX for Advanced & Expert Users

Formatting large Ascii file

Hi, I've got a very large ASCII file (1.5 GB), which doesn't have line terminators, making it impossible to read it right, i need to format it like: add line terminators. delete some lines on the file. delete some fields on all the remainings lines (can be identified by a string). After... (4 Replies)
Discussion started by: fahoo
4 Replies

7. Shell Programming and Scripting

mbox ascii mail text file ?

Hi, I am using "fetchmail" and "procmail" combination to trigger a job based on an input mail.Using fetchmail, incoming mail is downloaded from the mailserver to the local host.Once the mail is flushed,procmail starts execution and thereby triggers the application script. In-between... (3 Replies)
Discussion started by: DILEEP410
3 Replies

8. Shell Programming and Scripting

replacing text in an ascii doc

What would be the best way to replace all instances of... 09/26/2005 with 20050926 There are no spaces between the the date and the preceeding and following data. example lines looks like... snp01|NAME/OF/A/GROUP|09/26/2005081343|502 the 081343 is the time without colons. Thank... (6 Replies)
Discussion started by: cubs0729
6 Replies

9. UNIX for Dummies Questions & Answers

Creating flat text file (ASCII)

Hi everybody. I need help and I hope someone is willing to help me out here. My wholesale company is currently moving to new software. The old software is running on a UNIX platform. We need to migrate data from the UNIX system, but our former software provider refuses to assist the data... (5 Replies)
Discussion started by: Wdonero
5 Replies

10. UNIX for Dummies Questions & Answers

convert hex to ascii text

Is there a command to convert hex characters into their respective ascii values? (5 Replies)
Discussion started by: dangral
5 Replies
Login or Register to Ask a Question