On Sunday 07 September 2003 20:59, Shachar Shemesh wrote: > If you want your escape sequences to work on 90% of the cases, just use > the codes above. If you want them to work on 100% of the cases, RTFM > ncurses.
Well said. Just to complete the picture: - ncurses is a high level library (text windows, scrolling, highlighing, cursor motion, etc.) - It is built on top of a low-level library called terminfo. Terminfo can lookup a terminal model (from the TERM environment variable) in the terminfo database and extract its capabilities and escape sequences. - Man terminfo(4) will give a catalog of all possible terminal capabilities (most terminals use only a small subset). - Man tput(1) will tell you about a small utility that when given a capability name (and the TERM environment variable is well defined), will output the correct escape sequence. Example: tput smso; echo hello; tput rmso Should work with any terminal that has a standout mode. Looks like it would fit the bill of the original poster (given his shell examples). Of course, if he would use perl, than perl has CPAN modules that wrap both TermInfo and Curses. Cheers, -- Oron Peled Voice/Fax: +972-4-8228492 [EMAIL PROTECTED] http://www.actcom.co.il/~oron Some people claim that the UNIX learning curve is steep, but at least you only have to climb it once ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]