[Gllug] Changing the text colour at the command line

Nix nix at esperi.demon.co.uk
Tue Dec 10 16:33:41 UTC 2002


On Sun, 8 Dec 2002, Pete Ryland said:
> echo \033[0;37m
> 
> is a more likely candidate.  These are basically ANSI escape sequences.  The
> thing is, the way they work is that when you set the foreground colour it
> will stay that way (in the terminal) until you set it to something else.
> The escape sequence above will change it back to grey.

On xterm, \033[0;39m should do the trick as well; that's `restore to
default', rather than changing to any specific colour.

(That should be `CSI [0;39m', of course... ;} )

-- 
`Ah, but don't you feel the jackboot of state oppression whenever you have
 to deal with the uniformed storm-troopers of government bureaucracy, viz.
 the bus company ticket inspectors?
 Damn you for a Stalinist stooge!' --- Charlie Stross

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list