The following environmental variable controll the grep highlight color.
export GREP_OPTIONS='--color=auto' GREP_COLOR='31'
Argument -n
will show line number in grep results. Thus alias for the command is useful.
alias grep='grep -n'
Write them into your .bashrc
, source and then enjoy it!
Updated 2019-07-19