以下の内容はhttps://shuzo-kino.hateblo.jp/entry/2019/06/12/235202より取得しました。


tputの文字装飾設定を消す、あるいは一行だけ適用する方法

実際のところ

そのまんま繋ぐだけなら、コマンドを指定すればいいです。
が、設定リセットしないとそのまま続きます。
というわけで、用が済んだら"tput sgr0"で綺麗にします。

$ tput sgr0

一行だけ適用する場合、";"で繋いで

$ tput bold; echo "This text has the bold attribute."; tput sgr0
This text has the bold attribute.

shellスクリプトででCtrl+Cで終了した時文字装飾を消したい場合

    trap 'tput sgr0 || clear; exit 0' SIGINT

参考もと

www.linuxcommand.org




以上の内容はhttps://shuzo-kino.hateblo.jp/entry/2019/06/12/235202より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14