Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006

    Unanswered: formatting output

    My shell script generates a report which I want to send out as mail. I want put some colors in the text and also change the font in the report. Can I do it in Unix.I am using korn shell.

  2. #2
    Join Date
    Feb 2005
    It's possible in Unix because you're really just echoing control codes/escape characters down to the printer to override it's default settings. You need to find a technical manual for the printer to know what they are. Basically, 'intelligent' printers have a set of instructions that you can use to change things within the data stream. In other words, it's going to be more of a printer issue than most of what you can do in Unix. If you can find the right ones for your printer, you might be able to just use the echo command within the script. I seem to remember that you have to run the job and send it directly to the printer and not send the job to a file for later printing.

    The most common that I used to use were the PCL codes with HP printers.

    I don't think I ever did any of this with shell scripting. It was in 'C' and I'm sure if you have the time to research it, it could be done but it would be a lot easier to find some reporting tool that you could install to do all the dirty work.

    Unless someone already knows the PCL (or whatever) codes, you might find this a pretty time consuming project to do yourself. Even after I knew how to do it in C, it was still a pain.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts