Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
レタスを走らせてみました。通常は機能しますが、使用した場合:
lettuce | less
次のようなカラーコマンドがたくさんあります。
ESC[1;37m
ファイルに書き込むときにそれを取り除く方法は?
たとえば、キュウリはコンソールに素敵な色を印刷し、通常のテキストはlessとfileに印刷します。
これはうまくいくはずです:
$ lettuce | less -R # keep the colors
また
$ lettuce -v 3 # remove the colors
環境変数を設定しますDISABLE_COLORS:
DISABLE_COLORS
export DISABLE_COLORS=true
どんな値でも機能するはずです、私trueはセマンティクスのために選んだだけです。
true