• Home
  • Shell
    • Emacs
    • Perl
    • screen
    • sed
  • Ubuntu
    • VNC
  • Web Development
    • Javascript
    • Joomla
    • MySQL
    • osTicket
  • Windows
    • Gimp

BASH> Colorize your ‘cat’ output

Apr07
2011
Written by Scott Rowley

Ok, well thats a bit misleading. We won’t actually be using ‘cat’ but ‘pygmentize’ and its not perfect, but its better than 1 single color

This runs on Debian/Gentoo based Linux systems

apt-get update
apt-get install pygmentize

Once thats been installed what I did was to make an alias in my .profile

alias pcat='pygmentize'

Make sure to reload your .profile if you’ve added your alias

cd ~
. .profile

Example cat and pcat outputs:
Cat OutputPygmentize Output

Posted in BASH - Tagged alias, BASH, cat, pcat, pygmentize, ubuntu
« osTicket> Auto-Assignment Rules
» Web Dev> HTML form ‘Back’ button

Corrections? Questions? Comments?

Find an error?
Everything work out great for you?
Have some feedback?
Like to see something added to the article?

PLEASE leave us a comment after the article and let us know how we are doing, or if something needs corrected, improved or clarified.

Thank you!
- The Management

Advertisement

Sudo Bash
By Geeks - For Geeks

Back to Top