Artificial intelligent assistant

Show document withe formation and colors output I would like to write a small reminder that will be displayed on my console. I have found this link, But I don't know if there is a simpler way to write and display my document with colors. My idea is to create a document `cmd_info.txt`. then creates a shortcut `cmd_remaind` that launches `printf' %b\n'"$ (cat path_to_cmd_info.txt)"`. I was looking for a display of this style in the Terminal. Title in green color, cmd in yellow and info in white. ### `Title 1` `cmd1 info cnd2 info` ### `Title 2` `cmd1 info cnd2 info`

Not really; such coloring is entirely dependent on the capabilities of your terminal, and `bash`'s only role is to output the correct bytes for the terminal to read.

That said, and _because_ coloring is terminal-specific, you can use `tput` to automatically output the correct bytes for your current terminal.


green=$(tput setaf 2)
yellow=$(tput setaf 3)
white=$(tput setaf 7)
default=$(tput sgr0)
echo "${green}Title 1$(default)"
echo "${yellow}cmd1${default} ${yellow}info${default}"
echo "${yellow}cmd2${default} ${yellow}info${default}"


Note that foreground colors 2, 3, and 7 are _abstract_ , in that there is no guaranteed that they are _actually_ green, yellow, and white, respectively. Those are the conventional colors, but a terminal emulator can be configured to use different colors for each abstract slot.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy cb3727ca3519400aa2cb7683718244f4