目の前に僕らの道がある

勉強会とか、技術的にはまったことのメモ

2012-03-18から1日間の記事一覧

ログをtailfしつつ、特定のワードを色づけしたいとき

sh

自分メモ ansi colorで色づけするためのエスケープは "\x1b[" tailf /usr/local/apache/logs/$(date +"%Y/%m/error.%Y_%m%d").log |\ sed -e 's/\([error]\)/\x1b[33m\1\x1b[0m/g' ^[ [でも可。^[はctrl+v ctrl+[の順に入力する。 tailf /usr/local/apache/l…