You are not logged in.

#1 2009-10-21 21:58:42

hack.augusto
Member
From: Brazil
Registered: 2008-08-28
Posts: 124

[solved]cat with colored output?

just wondering if there is a app like cat, that outputs a file, but with vim/emacs' highlight and line numbering. (or some short of hack)

Why? well, I'm playing around with some C++ and I have multiple little files that I'd like to see on the shell before/after I run g++, and something like that would be quite useful.

Last edited by hack.augusto (2009-10-22 01:13:20)

Offline

#2 2009-10-21 22:09:02

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: [solved]cat with colored output?

you can use cat -b <file> to get line numbering... dunno about syntax highlighting though


.:[My Blog] || [My GitHub]:.

Offline

#3 2009-10-22 00:13:15

bl1nk
Member
Registered: 2008-07-29
Posts: 57
Website

Re: [solved]cat with colored output?

what about pygmentize?
it's part of community/pygments

Offline

#4 2009-10-22 00:56:38

opothehippo
Member
From: hella norcal bro
Registered: 2009-08-06
Posts: 89

Re: [solved]cat with colored output?

Color wrapper is a cool thing for a coloring any command/terminal thing, although it caused some problems for me with the AUR.


Arch x86_64 | XMonad

Offline

#5 2009-10-22 01:11:30

hack.augusto
Member
From: Brazil
Registered: 2008-08-28
Posts: 124

Re: [solved]cat with colored output?

@bl1nk
that's exactly what I imagined for highlight, thanks.

@Ghost1227
`cat -b` ignores blank lines, `cat -n` solved the problem big_smile, thanks

[update]
community/colorgcc is kinda cool too

Last edited by hack.augusto (2009-10-22 01:16:24)

Offline

Board footer

Powered by FluxBB