M
M
Moolzv Rivers2019-08-15 05:05:11
linux
Moolzv Rivers, 2019-08-15 05:05:11

BASH: explain why multi-colored text is not displayed?

Hello.
I'm sitting tormented, I can't understand, I write:

echo "$Black================================================================================"

$BlackI have it under Black='\[\e[0;30m\]'
But in response, plain text is displayed, only all this is replaced with the text in the variable, in short, like this:
\[\e]0;=========================================================================

Help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2019-08-15
@SaddledSharp

First , carefully google / read how to use control codes correctly, for example:
https://www.shellhacks.com/ru/bash-colors/
or
man echo
-e enable interpretation of backslash escapes
echo -e "$Black==== ================================================= ==========================="

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question