This question already has an answer here:

Is coloring an output possible using cat or similar command?

Let say I have some php or bash script or other. I don't need to edit the file, just to view the source. So cat filename does the job.

But, is it possible to colorize an output making it easier to read, like you can do with vim syntax:on mode?

marked as duplicate by Mongrel, G-Man, Satō Katsura, GAD3R, Kusalananda Jan 31 '17 at 9:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Yes, grc will achive what you need. github link

enter image description here

  • Looking good @steve. Does the script colorize the output of the actual scripts as well? (sorry, haven't tested it yet) – fugitive Jan 30 '17 at 22:51

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