view misc/ansi-colors.sh @ 588:e5ee69ef1a84

Make utility executable.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Mon, 03 Aug 2015 13:04:55 +0300
parents f589339bafa4
children 6087f2159dab
line wrap: on
line source

#!/bin/sh

echo "0>none/clear 1>bold 4>underscore 5>blink 7>reverse 8>concealed"

for i in 0 1 2 3 4 5 6 7; do
  printf "\033[${i}m ${i}type"
done
printf "\n"
for i in 0 1 2 3 4 5 6 7; do
  printf "\033[${i}m\033[43m\033[32m ${i}type"
done
printf "\033[0m\n"

echo "0>black 1>red 2>green 3>yellow 4>blue 5>magenta 6>cyan 7>white"
for i in 0 1 2 3 4 5 6 7; do
  for j in 0 1 2 3 4 5 6 7; do
    printf "\033[3${i}m\033[4${j}m ${i}f${j}b \033[0m"
  done
  printf "\033[3${i}m ${i}fnb \033[0m\n"
done