Robby75
Robby75

Reputation: 3455

colors in dash (not bash)

In bash, you can colorize output with (for example)

echo -e "\e[34mblue text\e[0m"

But that does not work with dash.

Is there a way to get colored output with dash?

Upvotes: 3

Views: 1144

Answers (1)

Cyrus
Cyrus

Reputation: 88583

With dash, bash, ksh, fish and zsh:

printf '%b' "\033[34;1mblue text\033[0m\n"

Upvotes: 6

Related Questions