ターミナルでERRORとかに色をつける
やりたいこと
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
参考リンク
.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
参考リンク
Author And Source
この問題について(ターミナルでERRORとかに色をつける), 我々は、より多くの情報をここで見つけました https://qiita.com/z589app/items/767357a626bc8ae22a0b著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .