grep/grepconf.sh
Jaroslav Škarvada 4ca30e887d Added script to check whether grep is coloured
Resolves: rhbz#1034631
2014-08-20 15:25:05 +02:00

12 lines
253 B
Bash

#!/bin/sh
case "$1" in
-c | --interactive-color)
! grep -qsi "^COLOR.*none" /etc/GREP_COLORS
;;
*)
echo >&2 "Invalid / no option passed, so far only -c | --interactive-color is supported."
exit 1
;;
esac