1#!/bin/bash
2
3# tput_colors - Demonstrate color combinations.
4
5for fg_color in {0..7}; do
6 set_foreground=$(tput setaf $fg_color)
7 for bg_color in {0..7}; do
8 set_background=$(tput setab $bg_color)
9 echo -n $set_background$set_foreground
10 printf ' F:%s B:%s ' $fg_color $bg_color
11 done
12 echo $(tput sgr0)
13done