That is, notes about terminals, and terminal emulators in Linux or Mac or wherever.

Resources

Problems With Man Pages

Some people like to use a white background. When using man pages, this can cause a lot of the text to be invisible.

Man uses less by default so see next section.

Problems with less

Here is a very complete discussion of that problem.

Note man tput is interesting.

Terminal Colors

Terminal colortest.sh
#!/bin/bash
# Take from:
# http://misc.flogisoft.com/bash/tip_colors_and_formatting

for clbg in {40..47} {100..107} 49 ; do
    #Foreground
    for clfg in {30..37} {90..97} 39 ; do
        #Formatting
        for attr in 0 1 2 4 5 7 ; do
            #Print the result
            echo -en "\e[${attr};${clbg};${clfg}m ^[${attr};${clbg};${clfg}m \e[0m"
        done
        echo #Newline
    done
done

for fgbg in 38 48 ; do #Foreground/Background
    for color in {0..256} ; do #Colors
        #Display the color
        echo -en "\e[${fgbg};5;${color}m ${color}\t\e[0m"
        #Display 10 colors per lines
        if [ $((($color + 1) % 10)) == 0 ] ; then
            echo #New line
        fi
    done
    echo #New line
done

exit 0