LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-03-2009, 03:14 AM   #1
john83reuben
Member
 
Registered: Oct 2007
Location: Kuala Lumpur,Malaysia
Distribution: Debian Etch, OpenSuse
Posts: 132

Rep: Reputation: 17
print text color using perl


Hi all,

I need some suggestions related to perl.

I am making a comparison script which compares two files and generates the differences in a file. Basically, im using the diff command in the script.

I want to color the differences in the report, so that I can send the colored differences to someone else.

Currently I tried with Term::ANSIColor; but this wil print the color only in terminal.

How can i print the color in the text file, so that when i transfered the file from unix to windows also, the report has color on the differences.

Any suggestion please.. Thank u

John
 
Old 12-03-2009, 07:34 AM   #2
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 59
I don't think you can produce formatting like color in a plaintext file. My guess is that you would need to produce a pdf or some other format to get color.
 
Old 12-03-2009, 12:44 PM   #3
john83reuben
Member
 
Registered: Oct 2007
Location: Kuala Lumpur,Malaysia
Distribution: Debian Etch, OpenSuse
Posts: 132

Original Poster
Rep: Reputation: 17
how bout print the document in MS word, and use its library for colors. I am not sure about this. Any suggestion pls.
Thank you
 
Old 12-04-2009, 12:05 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,565

Rep: Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425
If you're running on Linux, MS libs aren't avail.
However, OOO (openoffice.org) are; maybe you can use those?
 
Old 12-04-2009, 01:11 AM   #5
john83reuben
Member
 
Registered: Oct 2007
Location: Kuala Lumpur,Malaysia
Distribution: Debian Etch, OpenSuse
Posts: 132

Original Poster
Rep: Reputation: 17
ok.. so any other suggestion..is coloring a good idea, or is there a simpler way 2 show the differences..maybe bold or italic..somethin like tat..

thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How change text color using linux in text mode only runlevel 3? Xavius Linux - General 7 05-07-2009 03:19 AM
how to print text in color by ncurses without opening a ncurses window Greatrebel Programming 0 12-20-2006 10:15 AM
locate/print text in perl on screen Jerry Draper Programming 2 01-10-2006 12:36 PM
HP PS7150: text doesn't print in OOO and Abiword!, but I can print test page & w MzFF gabba Mandriva 6 10-31-2005 12:10 PM
I cant print in color Fiery Mandriva 0 04-10-2004 10:40 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration