tee
cat
後でファイルを使用できるように、stdinのコピーをファイルに保存します。
タイミングを記録して再生しながらこれを行うことができるツールはありますか?
だから私は以下が欲しい:
$ (echo foo; sleep 1; echo bar) |
the-tee-tool --out myfile > /dev/null
$ time the-tee-tool --in myfile | cat
foo
bar
real 0m1.002s
user 0m0.002s
sys 0m0.000s
そのようなツールを作成する方法を知っていますが、すでに存在していますか?
ベストアンサー1
今これです:https://gitlab.com/ole.tange/tangetools/-/tree/master/teetime
Usage:
... | teetime [-a] file | ...
teetime -i file
-a append to file
-i read from file