Here are a few cool escape sequences:
echo -e "\033(0" # Set line drawing mode echo -e "\033(B" # Set Text mode
I always wanted to colorize a 'cat' of a file (lord knows why?!), but tonight, I figured out how to do it!
You need to install the packages
In Fedora, its as easy as
yum install -y highlight source-highlightAfter this is complete, generate the script called 'scat' in /usr/bin:
#!/bin/bash INFILE="$1" if [ -n "$2" ]; then OPTS="-S $2" fi highlight $INFILE -A $OPTS
Here is a little trick to colorize man pages. Place these lines in your .bashrc file (~/.bashrc):
export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking export LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold export LESS_TERMCAP_me=$'\E[0m' # end mode export LESS_TERMCAP_se=$'\E[0m' # end standout-mode export LESS_TERMCAP_so=$'\E[38;5;246m' # begin standout-mode - info box export LESS_TERMCAP_ue=$'\E[0m' # end underline export LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline
Then the output of man looks like this:
