Re: Terminal Steuersequenzen

From: Sascha Klauder <sklauder(at)trimind.de>
Date: Tue, 8 Jun 2004 15:26:35 +0200

On Mon, Jun 07, 2004 at 10:03:51PM +0200, Marc Santhoff wrote:
> ich habe vor langer Zeit mal das unten zu sehende Skript im Netz
> gefunden. Es macht schöne bunte Buchstaben. ;)
>
> Wo finde ich eine komplette Liste der möglichen Steuersequenzen?

Ich hätte noch ein kleines Demo-Skript beizusteuern.

#!/bin/sh
# Display ANSI colours.
#

cat <<EOF1
This shell script shows all standard colour combinations on the current
console. If no colours appear, your console does not support ANSI colour
selections.
EOF1

esc="\033["
echo -n " _ _ _ _ _40 _ _ _ 41_ _ _ _42 _ _ _ 43"
echo "_ _ _ 44_ _ _ _45 _ _ _ 46_ _ _ _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

cat <<EOF
If you want bold characters, add a "1" to the parameters, so bright blue on
white would be "37;44;1". The whole ANSI sequence is then ESC[37;44;1m
EOF

Cheers,
-sascha

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Tue 08 Jun 2004 - 15:26:55 CEST

search this site