ProAnswers.org

How to implement command line coloration in UNIX

I am working on a small Unix shell (written completely in C),
how to copy bash’s prompt coloring technique. Any one tried this?
Help me.

The easiest way to do colorization in the unix shell is to use a library like curses / ncurses. It provides a portable way to implement items like corolization in the unix shell.

You can use simple shell escape commands like \033[31mRed\033[0m or use the ncurses library



Here's [b]a link[/b][b] [/b]which help you



    http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/color.html