シェル
shell
スクリプティングについてはスクリプトを見よ。
About
シェルとは、コンピュータのOSを構成するソフトウェアの一つで、利用者からの操作の受け付けや、利用者への情報の提示などを担当するもの
shやbashはシェルソフトウェア(シェルプログラムともいう)の例。
awesome-shell
https://github.com/alebcay/awesome-shell
A curated list of awesome command-line frameworks, toolkits, guides and gizmos.
ANSIエスケープシーケンス
ターミナルの出力文字に色や装飾を付けたりできる。
Examples:
# 太字
echo -e "Normal \e[1mBold\e[0m"
# 文字色、背景色変更
echo -e "Default \e[43m\e[31mRed text on Yellow background\e[0m"
# 256色対応
# - \e[38;5;文字色番号m
# - \e[48;5;背景色番号m
echo -e "Default \e[48;5;239m\e[38;5;93mPurple text on Gray background\e[0m"
コードの例:
| Code | 効果 |
|---|---|
| 0 | Reset all attributes |
| 1 | Bold/Bright |
| 31 | Red text |
| 32 | Green text |
| 33 | Yellow text |
| 34 | Blue text |
| 35 | Magenta text |
| 36 | Cyan text |
NOTE:
- BashやZshでは
$'\e[...m'のANSI-C Quotingを使わなければならないケースがあるかも。
参考:
Child Pages
最終更新 2020-06-23: [go,shell/posix] About Go plugin & POSIX shell (d05118182)