#!/bin/bash # ANSI color--Use these variables to make output in different colors # and formats. Color names that end with 'f' are foreground colors, # and those ending with 'b' are background colors. proc initializeANSI { setglobal esc = '"\033'" # If this doesn't work, enter an ESC directly. # Foreground colors (as denoted by the 'f' at the end of the names) setglobal blackf = ""$(esc)[30m""; setglobal redf = ""$(esc)[31m""; setglobal greenf = ""$(esc)[32m"" setglobal yellowf = ""$(esc)[33m"," bluef = ""$(esc)[34m""; setglobal purplef = ""$(esc)[35m"" setglobal cyanf = ""$(esc)[36m""; setglobal whitef = ""$(esc)[37m"" # Background colors setglobal blackb = ""$(esc)[40m""; setglobal redb = ""$(esc)[41m""; setglobal greenb = ""$(esc)[42m"" setglobal yellowb = ""$(esc)[43m"," blueb = ""$(esc)[44m""; setglobal purpleb = ""$(esc)[45m"" setglobal cyanb = ""$(esc)[46m""; setglobal whiteb = ""$(esc)[47m"" # Bold, italic, underline, and inverse style toggles setglobal boldon = ""$(esc)[1m""; setglobal boldoff = ""$(esc)[22m"" setglobal italicson = ""$(esc)[3m""; setglobal italicsoff = ""$(esc)[23m"" setglobal ulon = ""$(esc)[4m""; setglobal uloff = ""$(esc)[24m"" setglobal invon = ""$(esc)[7m""; setglobal invoff = ""$(esc)[27m"" setglobal reset = ""$(esc)[0m"" }