Skip to content

Instantly share code, notes, and snippets.

@anthonybishopric
Created December 20, 2012 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonybishopric/4347253 to your computer and use it in GitHub Desktop.
Save anthonybishopric/4347253 to your computer and use it in GitHub Desktop.
cat with syntax highlighting
#! /usr/bin/env bash
# pip install -r Pygments
pygmentize -f terminal256 $1 2>/dev/null
if [ $? -ne 0 ]
then
cat $1
fi
# you can also use this with less by doing
# pat the_file.py | less -R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment