Posts List

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 [ -fcat /usr/local/bin/ccat #!/bin/bash if [ ! -t 0 ];then file=/dev/stdin elif [ -f1 ];then file=1elseecho"Usage:0code.c" echo "or e.g. head code.c|0"exit1fipygmentizefterminalgfile =-=-=-=-= Powered by Blogilo