Re: zvt questions



On Fri, Nov 12, 1999 at 05:05:24PM +1300, Lyndon Drake wrote:
> Hi,
> 
> 1. Does anyone have a handy reference to terminal escape codes, especially
>    the ones for colours?
> 

Try this (from some faq I think).

#!/bin/bash
# Display ANSI colours.
#
      esc="\033["
      echo -e "\t  40\t   41\t   42\t    43\t      44       45\t46\t 47"
      for fore in 30 31 32 33 34 35 36 37; do
        line1="$fore  "
        line2="    "
        for back in 40 41 42 43 44 45 46 47; do
          line1="${line1}${esc}${back};${fore}m Normal  ${esc}0m"
          line2="${line2}${esc}${back};${fore};1m Bold    ${esc}0m"
        done
        echo -e "$line1\n$line2"
      done

/Erik
-- 
Erik Bågfors               | http://www.acc.umu.se/~bagfors/
Email: bagfors@pdc.kth.se  | Center for Parallel Computers
GSM +46 70 398 54 43       | Supporter of free software



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]