grep-color.sh 403 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. scriptname=$(basename ${BASH_SOURCE[0]})
  3. scriptdirname=$(dirname ${BASH_SOURCE[0]})
  4. if [ -n "$(command -v grep)" ]; then
  5. debug "Colorizing grep."
  6. alias grep='grep --color=auto'
  7. fi
  8. if [ -n "$(command -v egrep)" ]; then
  9. debug "Colorizing egrep."
  10. alias egrep='egrep --color=auto'
  11. fi
  12. if [ -n "$(command -v fgrep)" ]; then
  13. debug "Colorizing fgrep."
  14. alias fgrep='fgrep --color=auto'
  15. fi