File: shell-colors.sh

package info (click to toggle)
shell-fm 0.7%2Bgit20100414-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 444 kB
  • ctags: 305
  • sloc: ansic: 4,422; makefile: 135; python: 80; haskell: 76; sh: 67; perl: 19
file content (18 lines) | stat: -rwxr-xr-x 518 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
# shell-colors.sh, prints possible fg/bg color combinations
# using escape sequences.
#
# Copyright (C) 2007 by Jonas Kramer.
# Published under the terms of the GNU General Public License (GPL).

echo -ne "FG/BG\t"
for bg in `seq 40 47`; do echo -ne "   $bg   "; done

for fg in `seq 30 37`; do
	echo -ne "\n$fg (N)\t"
	for bg in `seq 40 47`; do echo -ne "\x1B[$bg;${fg}m Normal \x1B[0m"; done
	echo -ne "\n$fg (B)\t"
	for bg in `seq 40 47`; do echo -ne "\x1B[$bg;${fg};1m  Bold  \x1B[0m"; done
done

echo