Skip to content

Instantly share code, notes, and snippets.

@davidbalbert
Created December 12, 2011 17:44
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 davidbalbert/1468309 to your computer and use it in GitHub Desktop.
Save davidbalbert/1468309 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ ! -t 0 ]; then
file=/dev/stdin
elif [ -f $1 ]; then
file=$1
else
echo "Usage: $0 code.c"
exit 1
fi
ccat $file | less -R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment