2 # Test for POSIX.2 options for grep
4 # grep [ -E| -F][ -c| -l| -q ][-insvx] -e pattern_list
5 # [-f pattern_file] ... [file. ..]
6 # grep [ -E| -F][ -c| -l| -q ][-insvx][-e pattern_list]
7 # -f pattern_file ... [file ...]
8 # grep [ -E| -F][ -c| -l| -q ][-insvx] pattern_list [file...]
15 # checking for -E extended regex
16 echo "abababccccccd" | ${GREP} -E -e 'c{3}' > /dev/null 2>&1
17 if test $? -ne 0 ; then
18 echo "Options: Wrong status code, test \#1 failed"
22 # checking for basic regex
23 echo "abababccccccd" | ${GREP} -G -e 'c\{3\}' > /dev/null 2>&1
24 if test $? -ne 0 ; then
25 echo "Options: Wrong status code, test \#2 failed"
29 # checking for fixed string
30 echo "abababccccccd" | ${GREP} -F -e 'c\{3\}' > /dev/null 2>&1
31 if test $? -ne 1 ; then
32 echo "Options: Wrong status code, test \#3 failed"