Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got a Bash script that outputs results with pretty Bash colours, and I need to include the output with colors in a Word document.

I would like to avoid putting a screenshot as the ouput is lenghty. I also don't really want to go through the pain of adding colours manually in Word so I am looking for an easy way to copy the text with colours in PuTTY and paste into Word with colours.

share|improve this question
1  
Not really a programming question. Try Super User? –  Rafe Kettler May 16 '11 at 1:21
    
I guess it's border line as it is more to document stuff, I'll look over there thanks. –  Philippe May 16 '11 at 1:40
add comment

migrated from stackoverflow.com May 17 '11 at 19:06

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 2 down vote accepted

You'll need to do a two-stage conversion, first to HTML then to Word. Try something like ansi2html, or Ansifilter and then copy/paste from a browser into Word. Generating a PDF from HTML should also be trivial (ask if you need information).

share|improve this answer
    
ansi2html is what i needed, it works as a charm, thanks –  Philippe May 16 '11 at 6:41
    
"They do it wrong, so I'm going to do it wrong too" is rarely a valid excuse. –  Ignacio Vazquez-Abrams May 17 '11 at 19:14
    
@Ignacio Vazquez-Abrams, "They weren't moved, so why should this one" ... is actually more the point. –  Slomojo May 18 '11 at 4:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.