この資料は Rust 製のコマンドラインツール ctee について紹介するものです。
Rustの環境構築やツールのインストール方法については以下を参照してください
標準入力からANSIカラーシーケンスを除去する tee の代替ツールです。
GitHub - Lipen/ctee: Unix's tee with stripping of ANSI-colors
ctee [OPTIONS] [FILES]...
-h
, —-help
ヘルプ情報を表示する-V
, —-version
バージョン情報を表示する-a
, --append
与えられたファイルに対して、上書きではなく追記する--bs <BUFFER_SIZE>
バッファサイズを与える
デフォルト:8192
--strip-ansi <STRIP_ANSI>
ファイルへの書き込み時にANSIカラーコードを除去するか指定する
デフォルト: true
<FILES>...
出力ファイル% ctee --help
ctee 0.1.0
Konstantin Chukharev <[email protected]>
Read from STDIN and write to STDOUT (unchanged) and FILES (without ANSI-colors)
USAGE:
ctee [OPTIONS] [FILES]...
ARGS:
<FILES>... Output files
OPTIONS:
-a, --append Append to the given files instead of overwriting
--bs <BUFFER_SIZE> Buffer size [default: 8192]
-h, --help Print help information
--strip-ansi <STRIP_ANSI> Strip ANSI color codes when writing to files [default: true]
-V, --version Print version information