bash,zsh,dashで256色を表示する
@k_uiさんの記事を基にした、256色をサンプル表示するスクリプトです。bash、zsh、dashで動作確認しました。
for c in $(seq 0 255); do printf "$(tput setaf ${c}) %03d" ${c} ; [ $(($c%16)) -eq 15 ] && echo;done;echo
bashではこんな感じ。
ところで動作要件よく分かっていません。動かない例とか有れば教えてくださいね。
Author And Source
この問題について(bash,zsh,dashで256色を表示する), 我々は、より多くの情報をここで見つけました https://qiita.com/watertight/items/a845ce98099d9ba557ce著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .