Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 745 Bytes

colorize-output-in-terminal-bash.md

File metadata and controls

27 lines (16 loc) · 745 Bytes

Colorize Output in Terminal

Posted on 31 Jan, 2020

The ANSI escape sequences help adding color to the terminal (Doesn't work on Windows I guess)

Here is the format:

\033[<ForegroundColorCode>;<BackgroundColorCode>;<Style>mYour Text

where

<ForegroundColorCode>, <BackgroundColorCode> & <Style> are integer Color Codes. See Resources for list of colors.

Example:

echo -e "\033[92;1mHello\033[0m"

Hello will be bold & green in color

Resources