Not sure if this will work on other people's computers. On my system (Mac OS X) it displays text in red and blue.
Kind of useless by itself, but if I want to display a message in a shell script, color coding it makes it a hell of a lot easier to read.Code:#!/bin/bash echo "This text is colored red." | grep --color=always "This text is colored red."; #displays text in red mkdir "longfilethatiwillneveruse"; cd "longfilethatiwillneveruse"; mkdir "This text is colored blue."; ls -G; #displays text in blue rmdir "This text is colored blue."; cd ..; rmdir "longfilethatiwillneveruse";
Life's too short to be cool. Be a nerd.
You can also set colors (and more) using escape sequences (echo -e) - just a tip![]()
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Most unix's (ala linux) support ANSI Colors/VT100. Pedigree supports it too. Lookup 'VT100 Escape codes' to see all the neat things you can do with them.
(Works on windows too, if you load ANSI.sys (I think that's the one, haven't done it in forever))
Yes, you're right, Tk. I wrote a short tutorial about this, actually. Shell Script GUIs or something stupid like that.
sudo rm -rf /
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks