やりたいこと
ErrorとかWarningとかに色がつけたいよね。
.bashrcに追加
.bashrc
function highlight(){
grep -i --color=auto -e '$' -e error -e warning -e failure $@
}
使い方
$ echo "This is error test" | highlight
This is error test
$ echo "This is error test" | highlight -e is
This is error test
参考リンク
Linuxでファイル・標準出力の特定のキーワードだけハイライト表示させる | 俺的備忘録 〜なんかいろいろ〜
↧