zsh入門 パート2at UNIX
zsh入門 パート2 - 暇つぶし2ch881:名無しさん@お腹いっぱい。
04/01/27 12:45
簡単にやるとしたらこんな感じかな。ただ、端末周りを扱うプログラムで支障が
あるかもね。

% cat ./tored
tored () {
local line
while read line; do
print "\e[31;1m$line\e[0m"
done
}
% source ./tored
% perl -e 'printf STDERR "this is stderr.\n"'
this is stderr.
% perl -e 'printf STDERR "this is stderr.\n"' | tored
this is stderr.
% perl -e 'printf STDERR "this is stderr.\n"' 2>&1 | tored
this is stderr.
% exec 2> >(tored)
% perl -e 'printf STDERR "this is stderr.\n"'
this is stderr.

# 色は省略しています


次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch