Linux - watch command doesn't show colors over ssh

I have a very simple script named colors

to print "HEY" in green and bold using codes around the text.

Colors:

#!/usr/bin/env python

a = '\033[0m\033[32m\033[01mHEY\033[0m'

print a

      

\033[01m

makes the text bold.

\033[32m

makes the text green.

\033[0m

should be around the text on both sides.

  • When I run the script on my machine - it prints in bold and green .
  • When I run the script on my machine with clock ( watch -c colors

    ) - it prints in bold and green .
  • When I run the script on the server via SSH - it prints in bold and green .
  • When I run the script on the server with the clock and via SSH ( watch -c colors

    ) - in the prints are in bold .

I don't understand why the combination of watch and ssh makes the print only bold and ignores green. Did I miss something?

What is the problem?

+1


source to share





All Articles