0

Replace grep command with grep -n --colour?

is there anything similar for rgrep auto color?

epsilon8
  • 121

2 Answers2

2

add this line to your .bashrc in your home directory

alias rgrep="grep -n --colour"
0

Just execute the following lines and modify one line as describe bellow

mkdir -p ~/bin
cd ~/bin
wget http://sdjf.esmartdesign.com/files/rgrep
chmod +x rgrep

Edit it and modify the line

args=${args:--His}

To this version:

args="${args:--His} --color=auto"
David Foerster
  • 36,890
  • 56
  • 97
  • 151
mnono
  • 41