ccat: coloured cat
Using python pygments module, we can create a coloured cat. Wrap it in a bash shell script called ccat: bowo@pcxthinkslack:~$ cat /usr/local/bin/ccat #!/bin/bash if [ ! -t 0 ];then file=/dev/stdin elif [ -f $1 ];then file=$1 else echo "Usage: $0code.c" echo "or e.g. head code.c|$0" exit 1 fi pygmentize -f terminal -g $file =-=-=-=-= Powered by Blogilo