View original Gist on GitHub
# copy code into your clipboard first # then execute the following code pbpaste | highlight --syntax=bash --out-format=rtf --output=/tmp/my-formatted-code.rtf