grc(Generic Colouriser)はログファイルやコマンドの出力結果に色付けして見やすくしてくれるコマンドです。

インストール

homebrewでインストールできます。

1
brew install grc

インストール後 ~/.bashrc または ~/.bash_profileに以下を追記します。追記後source ~/.bashrcで反映させます。

1
source "`brew --prefix`/etc/grc.bashrc"

デフォルトで以下のコマンドに色付けがされます。

  • configure
  • diff
  • make
  • gcc
  • g++
  • as
  • gas
  • ld
  • netstat
  • ping
  • traceroute
  • head
  • tail
  • dig
  • mount
  • ps
  • mtr
  • df

pingの実行結果

[f:id:grmn:20150824233235p:plain]

dfの実行結果

[f:id:grmn:20150824233238p:plain]

あまり使っている人がいなそうですが、地味に便利です。

参考

Comments