ユーザ用ツール

サイト用ツール


bash:script:09_display_color

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
bash:script:09_display_color [2014/06/05 07:17] – bash:スクリプト:color表示 renamed to bash:script:09_display_color matsuibash:script:09_display_color [2015/05/08 06:21] (現在) matsui
行 1: 行 1:
 +====== 09 color表示 ======
 +<code>
 +$ echo -e '\e[VALUE[;VALUE..]mSTRINGS\e[m'
 +</code>
  
 +VALUE
 +<code>
 +Text attributes
 +0 All attributes off
 +1 Bold on
 +4 Underscore (on monochrome display adapter only)
 +5 Blink on
 +7 Reverse video on
 +8 Concealed on
 + 
 +Foreground colors
 +30 Black
 +31 Red
 +32 Green
 +33 Yellow
 +34 Blue
 +35 Magenta
 +36 Cyan
 +37 White
 + 
 +Background colors
 +40 Black
 +41 Red
 +42 Green
 +43 Yellow
 +44 Blue
 +45 Magenta
 +46 Cyan
 +47 White
 +</code>
 +
 +
 +1.赤文字にする。
 +<code console>
 +echo -e "\e[31m AAAA \e[0m"
 +</code>
 +
 +2.背景黄色の文字赤にする。
 +<code console>
 +echo -e "\e[31m\e[43m AAAA \e[0m"
 +</code>
 +
 +3.大文字緑にする。
 +<code console>
 +echo -e "\e[1;32m AAAA \e[0m"
 +</code>
 +
 +{{tag>bash}}