BASH change color of text ?
Nils Kassube
kassube at gmx.net
Tue Mar 11 21:09:16 UTC 2008
dave selby wrote:
> I need to change the terminal text color when printing a warning. So
> far in python the following works a treat ...
[...]
> However I need a bash script to do the same ...
>
> dave at dev-machine:/var/lib/kmotion/daemons$ print "\033[1;32mkmotion
> has been started\033[1;37m"
> Warning: unknown mime-type for "\033[1;32mkmotion has been
> started\033[1;37m" -- using "application/*"
> Error: no such file "\033[1;32mkmotion has been started\033[1;37m"
> dave at dev-machine:/var/lib/kmotion/daemons$
Try this:
echo -e "\033[1;32mkmotion has been started\033[1;37m"
Nils
More information about the ubuntu-users
mailing list