0

I work in bash/xterm a lot, and do a lot of filtering of HTML. What I was wondering is if there is a simple way to highlight html to stdout?

Something like:

$ cat file.html | [some html highlighting utility]

Would output syntax colored HTML to standard out, assuming $TERM is xterm-color or xterm-256color.

Is there anything like that out there?

2 Answers 2

4

Yes and it's called highlight, I used to run highlight -q -s vim-dark -M file (-M means --xterm256)

There is another option, Pygments if you are Python fan, you will like it. You can just run pygmentize example.html.

0
0

use this tool, worked great for me

https://github.com/theZiz/aha

cat file.html | /path/to/compiled-aha

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .